Issues with model estimation

Dear all,

I’m trying to esitmate a rather large DSGE and I’ve came across several issues.
Attached I have 2 mod files. The first one, steady_modelV2, tries to estimate the model using standard RWMH, but there are many problems computing the mode. I’ve gone through all options for mode_compute, and the best solution I could find was mode_compute=6, but the results for convergence of the model, the convergence diagnostics for the parameters, show there are problems.
The rest of the options tell me that the hessian is not invertible.

In the second one, steady_modelV3, I try using HSSMC. I read in the book by Herbst and Schorfeide that there might be instances in which the posterior is not well behaved, and computing the mode might not be doable. The estimation works rather fine, I think, in this case, but the shock processes for theta and z are estimated at unit roots, and I don’t really know how to fix this.

In both cases I ran the identification command, and all criteria tell me that all parameters are identified. Also, I think I’m correctly dealing with parameter dependence, but the issues might arise because I’m not. Don’t know how to check this.

Thanks!
data_useV2.mat (6.9 KB)
steady_modelV2.mod (14.8 KB)
steady_modelV3.mod (14.3 KB)
data_useV3.mat (6.9 KB)

My hunch is that there is still a problem with the data treatment. The steady state of the variables in the model seems to be quite different from the data mean. That seems to particularly apply to spread where the model steady state is about 1, but the data mean about 0.

Hi professor,

Thanks for the comment! I corrected that issue, but the mode still has problems when dealing with anything but mode_compute=6. In that case, I get pretty good acceptance rates (between 25% and 1/3) but the convergence criteria shows there’s something off.
Any further ideas?

Thanks!

I usually recommend trying mode_compute=5 and then inspecting the mode_check plots.

Hi professor,

I just did it with mode_compute=5, and I get this error

Error using chol
Matrix must be positive definite.

Error in posterior_sampler_initialization (line 77)
d = chol(vv);

Error in posterior_sampler (line 60)
posterior_sampler_initialization(TargetFun, xparam1, vv, mh_bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_, dispString);

Error in dynare_estimation_1 (line 432)
posterior_sampler(objective_function,posterior_sampler_options.proposal_distribution,xparam1,posterior_sampler_options,bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_,dispString);

Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);

Error in steady_modelV2.driver (line 1770)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 310)
evalin(‘base’,[fname ‘.driver’]);

Error in steady_model_masterV2 (line 41)
dynare steady_modelV2 noclearall

Also, the mode_check plots look bad.
for the data treatment, I did as follows for the spread
spread_obs=exp(spread_obs)
That way, it has mean of around 1

Something I find really confusing is that when I run identification, the results tell me that all parameters are identified, but this plot makes me think that this is not the case

I would suggest to try to identify where the red dots come from. You can use options_.debug= true; for that.

Thanks!!! Just one more question
What should I do with this output? Is there a way to avoid certain values?
Also, as far as I go, the inverse gamma, which is my prior for eC, for example, should not include 0, so why is 0 even an option which the optimizer tried?

I guess my question is, can I, and should I, fix these issues by chaning the priors?

Again, really appreciate the help!

mode_check:: could not solve model for parameter SE_eC at value 0.000, error code: 45 (Likelihood is not a number (NaN) or a complex number)
mode_check:: could not solve model for parameter rhoA at value 1.000, error code: 3 (Blanchard & Kahn conditions are not satisfied: no stable equilibrium.)
mode_check:: could not solve model for parameter rho_theta at value 0.976, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter rho_theta at value 0.977, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter rho_theta at value 0.978, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter rho_theta at value 1.000, error code: 3 (Blanchard & Kahn conditions are not satisfied: no stable equilibrium.)
mode_check:: could not solve model for parameter psi_i at value 1.000, error code: 5 (Blanchard & Kahn conditions are not satisfied: indeterminacy due to rank failure.)
mode_check:: could not solve model for parameter psi_pi at value 0.000, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.103, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.205, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.308, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.411, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.514, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.616, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.719, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.822, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter psi_pi at value 0.925, error code: 4 (Blanchard & Kahn conditions are not satisfied: indeterminacy.)
mode_check:: could not solve model for parameter epsilon_est at value -10.000, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter epsilon_est at value -6.822, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter epsilon_est at value -3.645, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter epsilon_est at value -0.467, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter epsilon_est at value 2.710, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter epsilon_est at value 5.888, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter epsilon_est at value 53.550, error code: 19 (The steadystate file did not compute the steady state)
mode_check:: could not solve model for parameter h_cons_est at value 1.000, error code: 22 (The steady state has NaNs or Inf.)

The first thing seems to be that you need to fix your steady state file to not break with parameter variations.

Thanks for the help!