Em 16 de fevereiro de 2010 Henrique escreveu:
Dear Jack, now I think I set up my problem using your script. But some
(silly) questions remain:
(1) The estimated coefficients are filtered or smoothed?
(2) How could I retrieve the residuals (to make model diagnosis)?
I think I'd found the answer for the first question. Looking at the last
loop of the script (line 104) we can see the user defined function "smpar"
(defined on the lines 45-74) that gives smoothed estimations. I suppose
"smpar" states for "smoothed parameters", am I right Riccardo?
Now I need to modify Riccardo's script in order to make it give me filtered
values (probably applying the kfilter() function).
Once the script starts to give filtered estimates I think I can answer my
second question: How could I retrieve the residuals to make model diagnosis
(correlogram, cusum, normality, etc.).
Looking at Gretl Command Reference I'd found the options to retrieve
information I need: (1)
&E gets the matrix of one-step ahead prediction errors; (2) &V gets the
variance matrix for these errors; (3) &S gets the matrix of estimated values
of the state vector; (4) &P the variance matrix of these estimates and;
(5) &G gets the Kalman gain.
So to continue my work I need find a way to get the filtered parameters and
get the &E, &V, &S, and &P.
Best regards,
--
*Henrique C. de Andrade*
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge