Re: Kalman and MLE issue
by Alecos Papadopoulos
Good afternoon.
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
>>
I tried also to embed the lot into a function, as the example script
does, but I continued to get the same error message.
Any ideas?
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
4 years, 12 months
System of Equations and Kalman/MLE - two suspicions
by Alecos Papadopoulos
I have the following two suspicions, can somebody please verify/dispel them?
1) In a system of equations, currently I have no way to impose
non-linear restrictions on the coefficients (like ratios or products of
coefficients, nothing fancier). Right? Wrong?
2) In using the Kalman filter together with maximum likelihood, consider
the following detail: say, in the "obsxmat" matrix there exists a
coefficient restriction, say a13 = a12/a11
The matrix A can be created by defining (arbitrary starting values)
scalar a11 = 0.1
scalar a12 = 0.5
scalar a13 = a12/a11
matrix A = {a11, a12, a13}
Now, free parameters are (a11, a12) only, and I guess these are the
parameters I will ask MLE to estimate. My suspicion is that, then, if I
define matrix A as above, the coefficient a13 will not be updated by the
MLE, since it does not maximize the likelihood with respect to it. And
since a13, as part of the state-space bundle, has to be defined
prior/outside the MLE command block and not inside it, it will remain a
fixed number for the MLE.
If my suspicion is right, then I think I have to define the matrix A by
matrix A = {a11, a12, a12/a11}
so that position a13 is also updated with the MLE estimate.
Right? Wrong?
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
4 years, 12 months