I am trying to estimate a large DSGE model (although with standard features) with Dynare but I am not getting any sensible results. The model works perfectly in simulation mode and I get sensible results then, but not when estimating.
I have tried reducing the size of the model to a fairly standard small open economy model, but nothing has changed.
In most cases I get the following message:
“Matrix is singular, close to singular or badly scaled. RCOND = Nan”
Sometimes I get instead:
“Error using -> mtimes. Inner matrix dimensions must agree”
Finally, in some cases dynare starts the estimation process but with a huge value of the maximul likelihood (or posterior) (99999999), and at each step I get a message “warning: possible inaccuracy in H matrix”. If the estimation concludes I get non-sensible results.
Does anybody know what these error messages imply? What am I doing wrong?
Thanks for your help,
the difficulties that you encounter suggest that the model is very far from reproducing the observed variables with the initial parametrization. The initial value of the estimated parameters for posterior mode optimization is equal to the prior mean for each parameter.
Such a problem may happen when the unit of measurement of the variables in the model aren’t the same as the unit of measurement of the observed variables.
You can check for this problem by using stoch_simul and checking that the theoretical mean reported by stoch_simul for the observed variables is commensurate with what you have in your observations. If not you may need to add and estimate scale parameters in your model.
If that the scale of the variables turns out to be correct and that you still encounter the same problems, it would be helpful either to post your *.mod file and the data set or to indicate at which line of which Matlab function arise the errors that you are reporting.