Looking at the code, I have a doubt concerning the choice that we made to return lik as a scalar and LIK as a vector, in the absence of analytical derivatives, and as cell arrays when we use analytical derivatives. I think it would be better if the Kalman filter functions returned additional arguments, set to empty when not using the derivatives. This would eliminate the code used to convert cell arrays to scalar/vector in dsge_likelihood.m
What do you think?
Best,
Michel
Hi Michel,
this looks fine to me. What about the following list of outputs for KF routines?
[lik, grad, hess, LIK, DLIK]
where the outputs grad, hess, DLIK will be empty with numerical derivatives and where lik is the scalar likelihood and LIK is the vector used for outer product of gradient.
We have to change accordingly the list of outputs captured by dsge_likelihood in every call to KF routines. In fact I did that choice in order not to change such a list of outputs for all KF routines, but it does not seem a very big deal ...
best Marco
On 8/27/2012 3:33 PM, Michel Juillard wrote:
Looking at the code, I have a doubt concerning the choice that we made to return lik as a scalar and LIK as a vector, in the absence of analytical derivatives, and as cell arrays when we use analytical derivatives. I think it would be better if the Kalman filter functions returned additional arguments, set to empty when not using the derivatives. This would eliminate the code used to convert cell arrays to scalar/vector in dsge_likelihood.m
What do you think?
Best,
Michel _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev