Am 07.10.2021 um 18:58 schrieb F.R.Costa:
Dear All,
I'm in trouble with state space models, as I find them difficult to
implement. I was able to set up a few with just one time-variant
unobservable variable but I'm not sure on what I'm doing when there are
more. Let's say we depart from the example of the Phillips curve on
pages 345-346 of Gretl manual, where the inflation rate (INFQ) depends
on the unemployment rate (URX). In the example, the intercept is
time-invariant and the coefficient for URX follows a random walk.
I looked at the example listing 36.4
(
http://gretl.sourceforge.net/guidefiles/example-36.4.inp) and at first
I also found it a bit puzzling.
But the trick there is that the unemployment rate URX is _not_ used in
the model as an exogenous regressor in terms of the notation of gretl's
state-space apparaturs. So there is no x, no obsx, and no time-varying
(nor constant) obsxmat. This feels a bit counterintuitive, especially
since in (36.4) (the equation, not the listing) there appears an x_t
which has nothing to do with the notation in that chapter. (So I think
that x should be changed in the doc.)
As explained below equation (36.5), what the listing 36.4 does is to
treat the time-varying coefficent as the latent state, using the
(apparently implicit) default of F == 1 == statemat.
(@jack: It seems that that default for statemat is not documented. If
there is no such default, then I don't know what's going on.)
And then unemployment URX is used as the "coefficient" H (=obsymat) of
that latent state, where that "coefficient" of course doesn't need to be
estimated, since it's an observable variable in reality.
So you could follow that route by expanding both the state vector and
the obsymat, and introducing a non-unit F to capture your wanted AR(1)
dynamics for the states.
cheers
sven