reduce mh_init_scale

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

reduce mh_init_scale

Postby zsm » Thu Sep 05, 2013 8:00 pm

Hi,

I am estimating a model with Dynare 4.3.3 (please find the code uploaded, the forum didnt allow to upload the data file - is there a way to do that?!) using Dynare 4.3.3.

When running this version of the code I get the following error message:
Multiple chains mode.
MH: Searching for initial values...
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.
MH: Enter a new value...

Even if I reduce this parameter, the code is not running, even if I set the parameter to 0, Dynare says to reduce it further, although it cannot be negative.

Before this error message the posterior modes and standard errors seem to be reasonable, but MH is not working.

Could you please help me out what the problem might be?

Also, there are other versions of this code, where the chol matrix is not positive definite or even when MH is running, the posterior distributions are extremely narrow.

What I tried so far:
- different computation methods: mainly 6 and 9
- different mh_jscale-s (0.1, 0.3, 0.4)
- different lik_init-s (2, 3)
- other prior shapes (gamma vs normal, not truncated priors etc)
- other prior moments
- shorter dataset/less observables
- estimating less number of parameters (sometimes only 1!)

Thank you very much for any comments in advance!
Attachments
SA_bayes16.mod
(14.78 KiB) Downloaded 83 times
zsm
 
Posts: 21
Joined: Fri Apr 12, 2013 1:39 pm

Re: reduce mh_init_scale

Postby zsm » Thu Sep 05, 2013 8:28 pm

Now, running the same code with differently transformed data (instead of y-SS(y), I used (y-SS(y))/SS(y) ), the error message changes:

Error using *
Inner matrix dimensions must agree.

Error in metropolis_hastings_initialization (line 110)
candidate = rand_multivariate_normal(
transpose(xparam1), d * options_.mh_init_scale, npar);

Error in random_walk_metropolis_hastings (line 69)
[ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck,
nruns, NewFile, MAX_nruns, d ] = ...

Error in dynare_estimation_1 (line 931)
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

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

Error in SA_bayes16_rev (line 876)
dynare_estimation(var_list_);

Error in dynare (line 120)
evalin('base',fname) ;

It does not seem to be related to the priors or the estimations options or does it?
zsm
 
Posts: 21
Joined: Fri Apr 12, 2013 1:39 pm

Re: reduce mh_init_scale

Postby jpfeifer » Fri Sep 06, 2013 8:10 am

Please put the all files including the datafile into a zip-file. Then you will be able to upload it.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: reduce mh_init_scale

Postby zsm » Fri Sep 06, 2013 1:23 pm

Good idea, done. Thank you!
Attachments
SAmodel.zip
(9.32 KiB) Downloaded 61 times
zsm
 
Posts: 21
Joined: Fri Apr 12, 2013 1:39 pm

Re: reduce mh_init_scale

Postby zsm » Sat Sep 07, 2013 4:22 pm

I am sorry, these are the correct files!
Attachments
SAmodel_rev.zip
(9.32 KiB) Downloaded 71 times
zsm
 
Posts: 21
Joined: Fri Apr 12, 2013 1:39 pm

Re: reduce mh_init_scale

Postby jpfeifer » Sun Sep 08, 2013 3:42 pm

Please run
Code: Select all
 model_diagnostics(M_,options_,oo_)

to see that your model has collinearity issues that prevent the Kalman filter from functioning. This in turn leads to the likelihood due to singularity issues always being Inf and Dynare not finding starting values. Tweaking estimation without fixing the model won't work.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests