Paolo,
It is hard to say without the data. I suggest you to try the problem
without the MLE part, such that you could check the state-space
representation. For example, obtaining filtered data. Passing that test, it
means that optimization is the problem. In that case, a good
starting parameter-vector can be obtained from the associated ARIMA (or
SARIMA) model.
Best, Rodrigo.
2012/5/29 Paolo Chirico <paolo.chirico(a)unito.it>
I have run the following script for local linear model with
quarterly
seasonality:
scalar r = 10
scalar s1=1
scalar s2=1
scalar s3=1
matrix z = {1; 0; 1; 0; 0}
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}
matrix T = {1, 1, 0, 0, 0; 0, 1, 0, 0, 0;
0, 0, -1, -1, -1; 0, 0, 1, 0, 0; 0, 0,
0, 1, 0}
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
The model is a local linear model with quarterly seasonal.
But, I get the following error: *failed to invert OPG matrix GG'*
Where is the error? In the initial values of r, s1,..., in the script, or
in kfilter()?
Best regards,
Paolo
--
Paolo Chirico
Statistica Economica
Dipartimento di Economia
"S. Cognetti de Martiis"
Università di Torino
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users