ok, thanks Allin.

Maybe the following part in the User guide should be rephrased in some future version, Section 34.6, pp. 308, presenting the ksmooth thing

<<On successful completion, all the quantities computed by kfilter are available as bundle members
(see section 34.5),...>>

This is what gave me the impression that I could use ksmooth (this and the first sentence in p. 308 that says <<Note that since ksmooth starts with a forward pass, it can be run without a prior call to kfilter.>>)


Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
On 30/12/2019 01:40, Allin Cottrell wrote:
On Mon, 30 Dec 2019, Alecos Papadopoulos wrote:

I am trying to estimate the parameters of a model that also has latent state variables, using the Kalman filter and maximum likelihood.

After setting up the filter, which I run and it appears to work fine on its own (i.e treating the parameters fixed to their initial values), I follow the example script in p. 313 of User's guide, where the mle command line is

mle logl = ERR ? NA : kb.llt     (where "kb" is the name of the Kalman bundle)

and inside the mle command we see

ERR = kfilter(&kb)

I wrote the same syntax but using "ksmooth" instead of "kfilter".

I get the message

"llt": no such item
The formula 'logl = ERR ? NA : kb.llt'
produced an error on execution

You need a forward pass (kfilter) to get the loglikelihood. The backward pass (ksmooth) gives you smoothed estimates of the state and its variance after filtering.

Allin

_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/