Error in the posterior IRFs
Posted: Thu Nov 24, 2011 1:55 am
Hi,
I was trying to estimate Ireland's 2010 paper "A New Keynesian Perspective on the Great Recession"
At the beggining I was trying to do that by using the default option (Chris Sims’ csminwel), but I had the following error:
??? Error using ==> chol
Matrix must be positive definite.
Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);
................................
So I then I tried to use "simulated annealing-like optimizer" (mode_compute=4). So it worked (at least the program was running). The problem is that the posterior distributions of the parameters are completely different to the priors. The other problem I had is that there is and error when dynare attemps to compute the posterior IRFs
??? Undefined function or method 'cs' for input arguments of type 'double'.
Error in ==> PosteriorIRF_core1 at 179
y = 100*y/cs(i,i);
Error in ==> PosteriorIRF at 209
[fout] = PosteriorIRF_core1(localVars,1,B,0);
Error in ==> dynare_estimation_1 at 897
PosteriorIRF('posterior');
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> ireland_repl at 216
dynare_estimation(var_list_);
Error in ==> dynare at 120
evalin('base',fname) ;
I do not know whether my prior distributions doesn't make sense or if I have to manipulate the data in someway.
I will appreciate if someone could help me. I'm posting the mod file and the data file.
Thanks,
Guidon Fenig
I was trying to estimate Ireland's 2010 paper "A New Keynesian Perspective on the Great Recession"
At the beggining I was trying to do that by using the default option (Chris Sims’ csminwel), but I had the following error:
??? Error using ==> chol
Matrix must be positive definite.
Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);
................................
So I then I tried to use "simulated annealing-like optimizer" (mode_compute=4). So it worked (at least the program was running). The problem is that the posterior distributions of the parameters are completely different to the priors. The other problem I had is that there is and error when dynare attemps to compute the posterior IRFs
??? Undefined function or method 'cs' for input arguments of type 'double'.
Error in ==> PosteriorIRF_core1 at 179
y = 100*y/cs(i,i);
Error in ==> PosteriorIRF at 209
[fout] = PosteriorIRF_core1(localVars,1,B,0);
Error in ==> dynare_estimation_1 at 897
PosteriorIRF('posterior');
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> ireland_repl at 216
dynare_estimation(var_list_);
Error in ==> dynare at 120
evalin('base',fname) ;
I do not know whether my prior distributions doesn't make sense or if I have to manipulate the data in someway.
I will appreciate if someone could help me. I'm posting the mod file and the data file.
Thanks,
Guidon Fenig