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