RBC_Est.mod problem

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.

RBC_Est.mod problem

Postby tovonony » Tue Jun 01, 2010 1:05 pm

hello,
i have some trouble in running RBC_Est.mod in the dynare user gide, i got the following error message:

??? Error using ==> chol
Matrix must be positive definite.
Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 43
[ ix2, ilogpo2, ModelName, MhDirectoryName, fblck,
fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] =
...
Error in ==> dynare_estimation_1 at 1057
feval(options_.posterior_sampling_method,'DsgeLikelihood',options_.proposal_distribution,xparam1,invhess,bounds,gend,data,...

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> RBC_Est at 133
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin('base',fname) ;

this is the .mod file:

var y c k i l y_l w r z;
varexo e;
parameters beta psi delta alpha rho epsilon;

model;
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l) = w;
c+i = y;
y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;
r = y*((epsilon-1)/epsilon)*alpha/k(-1);
i = k-(1-delta)*k(-1);
y_l = y/l;
z = rho*z(-1)+e;
end;

varobs y;

initval;
k = 9;
c = 0.76;
l = 0.3;
w = 2.07;
r = 0.03;
z = 0;
e = 0;
end;

estimated_params;
alpha, beta_pdf, 0.35, 0.02;
beta, beta_pdf, 0.99, 0.002;
delta, beta_pdf, 0.025, 0.003;
psi, gamma_pdf, 1.75, 0.02;
rho, beta_pdf, 0.95, 0.05;
epsilon, gamma_pdf, 10, 0.003;
stderr e, inv_gamma_pdf, 0.01, inf;
end;

estimation(datafile=simuldataRBC,nobs=200,first_obs=500,mh_replic=2000,mh_nblocks=2,mh_drop=0.45,mh_jscale=0.8);

thanks in advance for any help
tovonony
 
Posts: 15
Joined: Mon May 31, 2010 10:02 am

Re: RBC_Est.mod problem

Postby jpfeifer » Tue Jun 01, 2010 2:25 pm

If you want to delve into the theoretical underpinnings of the problem, look into Gill/King (2004): Numerical Issues Involved
in Inverting Hessian Matrices (http://gking.harvard.edu/files/numhess.pdf).
To circumvent them, you could use the option
Code: Select all
mode_compute=6
in the estimation command (see http://www.dynare.org/DynareWiki/MonteCarloOptimization and various forum posts).
------------
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: RBC_Est.mod problem

Postby tovonony » Tue Jun 01, 2010 3:15 pm

thank you very much, it runs!!!
tovonony
 
Posts: 15
Joined: Mon May 31, 2010 10:02 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests