I have a question concerning the comparability of the likelihood value from ML optimization in Dynare. Is there any reason why the value should not be comparable to the likelihood value from my own routine? They are materially different.

In Dynare I get “Fval obtained at the min routine: -2200”, i.e. a likelihood value of 2200. With my own routine (numerical derivatives, but using the same filtering routine, the “univariate diffuse kalman filter.m”) I get a likelihood of 2952 in the optimum point. I start with exactly the same initial parameter values. The final parameter values are somewhat more plausible in case of the Dynare result. I removed drift and constant from the state equations as necessary.

Is there any explanation for this?
Many thanks,
Tom

I believe the difference can have to do with the way Dynare modifies the system equations (Schur decomposition etc.). One additional thing that I found out by debugging is that Dynare takes all equations (also those which I consider measurement equations in my own routine) into the set of state equations. Admittedly, I have no complete understanding of this set-up, but maybe this way additional state noise is “created” which transmits to Ft, the prediction error variance.

If somebody can comment on these hypotheses or give a slightly more precise despription of this modified state space form, this would still be of help. The ultimate goal is a modelcomparison with my own model which has a time varying constant in the state equation with futher explanatory value.