??? Error using ==> chol Matrix must be positive definite.

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.

??? Error using ==> chol Matrix must be positive definite.

Postby Exalted » Thu May 13, 2010 6:49 pm

Hi

I am using the dynare 4.1.1. with MATLAB R2008b version 7.7. on Windows 7. When I run there is such a problem:

??? 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 ==> azerbaijan at 788
dynare_estimation(var_list_);

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


Could you please help me and say where is the problem and how can I fix it? My codes are attached.

Thank you.

Best,
Ali
Attachments
Dynare.rar
(8.89 KiB) Downloaded 317 times
Exalted
 
Posts: 2
Joined: Thu May 13, 2010 12:06 pm

Re: ??? Error using ==> chol Matrix must be positive definite.

Postby StephaneAdjemian » Thu May 13, 2010 7:52 pm

Hi, this error message tells that minus the hessian matrix at the estimated posterior mode is not positive definite as it should be. This means that the optimization routine (csminwel by default) didn't stop on the posterior mode. You need to get a better estimate of the posterior mode (starting with different initial conditions, changing the optimization routine...). Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: ??? Error using ==> chol Matrix must be positive definite.

Postby Exalted » Thu May 13, 2010 9:18 pm

Dear Stéphane

Thank you for your response. But how can I change the optimization routine? Could please help me?

And by changing the initial values there emerge other problems.
Exalted
 
Posts: 2
Joined: Thu May 13, 2010 12:06 pm

Re: ??? Error using ==> chol Matrix must be positive definite.

Postby jpfeifer » Fri May 14, 2010 7:35 am

Hi,
you could try using
Code: Select all
mode_compute=6

in the estimation command (see http://www.dynare.org/DynareWiki/MonteCarloOptimization or the respective forum threads).
------------
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: ??? Error using ==> chol Matrix must be positive definit

Postby sunrain » Thu Oct 25, 2012 1:27 am

jpfeifer wrote:Hi,
you could try using
Code: Select all
mode_compute=6

in the estimation command (see http://www.dynare.org/DynareWiki/MonteCarloOptimization or the respective forum threads).


Dear Jpfeifer,

Thanks very much!

I fixed it!

Thanks again!

Best

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests