On Tue, 5 Jul 2016, Paolo Chirico wrote:
I performed the example 30.3: "philips curve... with
time-varying slope"
1) I was responded the following error (in the MLE step):
...
/* ML estimation of intercept and the two variances */
? mle LL = err ? NA : B.llt
? B.obsy = B.depvar - b0
? B.obsvar = s_obs^2
? B.statevar = s_state^2
? err = kfilter(&B)
? params b0 s_obs s_state
? end mle
Unexpected byte 0xe2
Syntax error
*** error in function at_each_step, line 1
> b.obsymat = b.mX[b.t,]’
The formula 'err = kfilter(&B)'
produced an error on execution
Error executing script: halting
> end mle
Apparently corruption has occurred in copy-and-paste: there's no byte
0xe2 (which corresponds to a-circumflex in the ISO 8-bit encodings!)
in the original script. I've put a copy of the script for download at
http://users.wfu.edu/cottrell/tmp/kalman_phillips.inp
2) How can I be sure that b.obsymat was varing if obymat in bundle
objects
shows the initial value and not the last one?
You can modify the function at_each_step() as follows:
function void at_each_step(bundle *b)
printf "at_each_step, before: %g\n", b.obsymat[1]
b.obsymat = b.mX[b.t,]'
printf "at_each_step, after: %g\n", b.obsymat[1]
end function
This will show the value changing at each time-step.
Allin Cottrell