Page 1 of 1

Problems finding the mode

PostPosted: Thu Jan 26, 2017 2:12 pm
by clauper
I am trying to find a valid mode for my model, which gives me a lot of trouble. After the Sims algorithm failed, I tried it with mode_compute=6. I got the following error message after about an hour of calculations.

Code: Select all
Initial value of the log posterior (or likelihood): -57073124.9085

==========================================================
   Change in the posterior covariance matrix = 25.
   Change in the posterior mean = 15.7842.
   Mode improvement = 55085857.9789
   New value of jscale = 1.5609e-17
==========================================================

==========================================================
   Change in the posterior covariance matrix = 1.5531e-06.
   Change in the posterior mean = 14.6895.
   Mode improvement = 1171358.3304
   New value of jscale = 2.2212e-06
==========================================================
Error using chol
Matrix must be positive definite.

Error in gmhmaxlik_core (line 194)
    dd = transpose(chol(CovJump));

Error in gmhmaxlik (line 100)
    [PostMode, PostVariance, Scale, PostMean] =
    gmhmaxlik_core(fun, OldPostMode, bounds,
    gmhmaxlikOptions, Scale, flag, MeanPar,
    OldPostVariance, varargin{:});

Error in dynare_minimize_objective (line 258)
    [opt_par_values, hessian_mat, Scale, fval] =
    gmhmaxlik(objective_function, start_par_value, ...

Error in dynare_estimation_1 (line 204)
    [xparam1, fval, exitflag, hh, options_, Scale,
    new_rat_hess_info] =
    dynare_minimize_objective(objective_function,xparam1,options_.mode_compute,options_,[bounds.lb
    bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_);
   
Error in dynare_estimation (line 105)
    dynare_estimation_1(var_list,dname);

Error in main (line 706)
oo_recursive_=dynare_estimation(var_list_);

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

Error in main_mainfile (line 32)
dynare main noclearall


I get that the Sims Algorithm can fail if the calibration is too far from the posterior mode. But with the Monte Carlo algorithm (mode_compute=6), I don't exactly get why it breaks down. Where is the problem, or what would be the right strategy to overcome it? Thanks for helping.

I am using the unstable version "2017-01-16", but the same problem already arised with the stable version a couple of days ago.

Re: Problems finding the mode

PostPosted: Fri Jan 27, 2017 7:59 am
by jpfeifer
My guess is that this is a problem with the observation equations. Your data has really large movements, reaching up to 100 for zeobs. However, your prior mean for the shock standard deviations is 0.09, meaning that you roughly need a 100 standard deviation shock to get to 100. Could it be that you forgot to multiply your shocks by 100. See "Remark 10 (Scaling With a Factor 100)" in Pfeifer (2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" at https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf

Re: Problems finding the mode

PostPosted: Fri Jan 27, 2017 2:00 pm
by clauper
You were exactly right, I didn't adapt the shocks. Thanks a lot for pointing this out.

As a further possible source of trouble, I am worried that the Taylor rule

Code: Select all
R=rhoR*R(-1)+(1-rhoR)*(log(Rss)+phi_dp*(dp-steady_state(dp))+phi_y*(y-steady_state(y)))+zeta_MP; //(37)

leads to "quasi stochastic singularity", since Inflation (pi), interest rate (R) and output gap (y) are all observables. Is this a problem, or can the Monetary Policy shock deal with being the only not observable variable?

Re: Problems finding the mode

PostPosted: Mon Jan 30, 2017 9:34 am
by jpfeifer
No, as long as you have a monetary policy shock in there, there is no problem, because there is no exact linear combination in this case.