When we combine the Kalman Filter with the mle command, we use the
"kfilter" or the "ksmooth" function as a success/failure check for KF,
and if we're good, we tell the mle to have a look at the series with the
likelihood contributions, and proceed with parameter estimation.
We automate this by using a conditional statement on the mle line itself
(as shown e.g. in the user guide, p. 362).
In no-KF mle, this conditional statement is often used to impose
constraints on the parameters (like positivity of variances).
I understand that simple non-negative constraints can be imposed in
other indirect ways, but I have to impose bounds on the estimated
parameters like "0<alpha<1".
So can I somehow combine the naked mle "check" syntax with the
KF-success syntax into one, say
<hansl>
mle logl ERR && CHECK ? NA : kb.llt
....
ERR = kfilter(&kb)
scalar CHECK = (alpha>0) && (alpha<1)
params alpha
end mle
</hansl>
...or do I need something more elaborate? (maybe there is an issue with
the fact that good news for ERR is when ERR=0 while good news for CHECK
is when CHECK = 1, if I understand correctly?)
--
Alecos Papadopoulos PhD
Affiliate Researcher
Dpt of Economics, Athens University of Economics and Business
Foundation for Economic and Industrial Research (IOBE)
web:
alecospapadopoulos.wordpress.com/
ORCID:0000-0003-2441-4550