Estimation problem: compute=8 sets mh_init_scale to 0.40

Dear all,
I have been experiencing some problem with the estimation of my model, though model_diagnostics, steady, check, and identification test have been successful.
At first, I used mode 6 to estimate the model and got the “Error using ==> chol??? Matrix must be positive definite after the scaling step. Error in ==> gmhmaxlik at 196”. Since I could not find the source of that error in my data, I switched to “mode_compute =8, mh_jscale=0.3”. I got an error message “Log data density [Laplace approximation] is NaN. MH: I couldn’t get a valid initial value in 100 trials. MH: You should Reduce mh_init_scale…MH: Parameter mh_init_scale is equal to 0.400000. Enter a new value…” I entered new values at the prompt but at some point I got the error message “Matrix dimensions must agree.” At this point, I could not get why Dynare have set “mh_init_scale is equal to 0.400000” to start with while it should have been 2*0.3=0.6 according to the Reference Manual.
Next, I decided to change “mh_jscale” to different values in the estimation option but Dynare still sent out an error message where “MH: Parameter mh_init_scale is equal to 0.400000.”
Now, I don’t know what to do. I cannot estimate the model. Is the error coming from my code or from the computing mode? I would really appreciate is someone can take the time to see what is going on here.

How do the mode_check plots look like?

Hello jpfeifer,

Thank you very much for picking my question.

I have added the “mode_check” option to the estimation command. Please find the graphs in the attached file. They are strange. In addition, the graph of a few parameters is missing. (39.5 KB)

Dear jpfeifer,

I have done several experiments since my last post. Among those, I have estimated some parameters that where calibrated/set in the previous estimation. Now, red dots show in 19 cases vs 5 in the previous estimation.
Please find below the attached file.
Thank you very much for your time.
check plots with 3 more (52.5 KB)

Dear Charles,

I cannot say, but you may have serious problems with the model and or the prior. To investigate you can try the prior command. After the estimation command (where you put mode_compute=0, mh_replic=1, order=1 and provide a dataset), add:

prior simulate;

This will trigger a Monte Carlo by sampling in the prior distribution and performing some checks on each vector of parameter (detection of issues with the steady state, Blanchard and Kahn, …). In the end a table like this will be printed on screen:

Prior mass = 0.9986
BK indeterminacy share                = 0
BK unstability share                  = 0
BK singularity share                  = 0
Complex jacobian share                = 0
mjdgges crash share                   = 0
Steady state problem share            = 0.0014
Complex steady state  share           = 0
Nonpositive steady state share        = 0
Analytical steady state problem share = 0

(I obtained this one with fs2000 in the example folder). You’re good if the (effective) prior mass is close to 1 (as in the example). The reported (effective) prior mass is the the prior mass once we exclude the problematic vectors of parameters. The following lines report the (prior) share of the various problems you may have encountered in the Monte-Carlo. Here, in 0.14% of the draws we see that Dynare is not able to compute the steady state (either because there is no steady state or, most likely, because the nonlinear solver failed.


I agree with Stéphane. There is something very wrong with your estimation. Most likely, there is an inconsistency between the model and the data.

Dear jpfeifer, Dear Stéphane,

Thank you for your time and your advice.

I am going the review the model and the data.