bayesian estimate

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.

bayesian estimate

Postby mvtantardini » Mon Jul 06, 2009 1:44 pm

dear all,
i'm trying to estimate the parameters of my new keynesian model with bayeasian techniques (i'm replicating the code by stephan adjemian available on dynare summer school web site). i have a time series for every endogenous variable i'm working with (i'm not simulating them) but i cannot make my code run because of this error message, that i cannot interpret:

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 940
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 ==> stimabayes_modellogali at 156
dynare_estimation(var_list_);

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


i think the problem is in my data file, but i cannot understand where and what is this.
can anyone help me? what i should control with this kind of error?
thanks in advance,
best regards
mvtantardini
 
Posts: 2
Joined: Mon Jul 06, 2009 8:28 am

Re: bayesian estimate

Postby conglin » Tue Jul 21, 2009 4:46 pm

I also met the same question. Anyone can help?
conglin
 
Posts: 4
Joined: Wed Mar 25, 2009 8:53 pm

Re: bayesian estimate

Postby mvtantardini » Wed Jul 22, 2009 7:58 am

During my "experiments" I partially solved this problem: those messages refer to the errors structure of your model, you should control for it and impose them to be uncorrelated among equations. Up to now I succeeded in making the code run just using the same errors structure imposed by the original code (4 shocks, one for pie, one for mrs, one for g and one for a).
Anyway, even if I solved that problem I met a new one during the estimate iterations: Metropolis-Hasting algorithm gives me an acceptance ratio equal to 0 for every step. My equations are very little different from the ones in the original code, but their meaning is really the same (the system simulated is the same).
I cannot understand why that ratio is always 0, maybe my equations are not supported by the code, but how is it possible? Is the code not robust with different model specifications?
Can anyone help me?
Thanks in advance.
mvtantardini
 
Posts: 2
Joined: Mon Jul 06, 2009 8:28 am

Re: bayesian estimate

Postby MichelJuillard » Wed Jul 22, 2009 1:25 pm

The error message and then the difficulty with Metropolis is an indication that finding the posterior mode didn't succeed: the optimization stopped at a point which is not a maximum and the corresponding covariance matrix isn't definite positive. You need to make sure that your data correspond indeed to the concept of the variables in the model and that the priors are reasonable for your case rather than the original example.

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests