On Tue, 29 May 2012, Paolo Chirico wrote:
> I have run the following script for local linear model with quarterly
> seasonality:
[snip]
you define a matrix Q:
matrix Q = {s1^2, 0, 0, 0, 0; \
0, s2^2, 0, 0, 0; \
0, 0, s3^2, 0, 0; \
0, 0, 0, 0, 0; \
0, 0, 0, 0, 0}
Then you do:
> kalman
> obsy y
> obsymat z
> statemat T
> obsvar r
> statevar Q
> end kalman --diffuse
>
> mle ll = ERR ? NA : $kalman_llt
> ERR = kfilter()
> params r s1 s2 s3
> end mle
mle is spinning its wheels: you haven't provided any means of
updating your Q matrix based on the current values of s1, s2 and s3.
You need to insert, just before the call to kfilter()
Q[1,1] = s1^2
Q[2,2] = s2^2
Q[3,3] = s3^2
(There may be other problems but that's the most obvious one.)
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
You are right.
I have corrected the script and now it' ok.
Thanks
Paolo
--
Paolo Chirico
Ricercatore e Professore Aggregato
di Statistica Economica
Università di Torino
Via Maria Vittoria, 38
10123 Torino (Italy)