chol matrix

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.

chol matrix

Postby picchio79 » Tue Aug 10, 2010 1:17 pm

Hello everybody,

I am trying to estimate a simple RBC model for rhe euro area.

The strange thing is that sometimes it works well. Sometimes without modifying anything I get the following:

??? 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 1061
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 ==> vero at 156
dynare_estimation(var_list_);

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


I attach my files.
Hope you can help me to fix it
I thank you in advance ,

Alessandro
Attachments
vero.mod
(1013 Bytes) Downloaded 63 times
modicaeuroarea.xls
(78 KiB) Downloaded 59 times
picchio79
 
Posts: 3
Joined: Thu Aug 05, 2010 2:47 pm

Re: chol matrix

Postby jpfeifer » Tue Aug 10, 2010 3:55 pm

Hi, this is a common problem. You will find several posts regarding this issue in the forum. The short answer is that csminwel involves some randomness and sometimes the inverse hessian resulting from the optimization is not positive definite, even when you keep the model, the data and the starting values the same. If you keep getting the error message and mode_compute=4 (the default) does not succeed, use mode_compute=6 and see the Dynare wiki (http://www.dynare.org/DynareWiki/MonteCarloOptimization)
------------
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 6 guests