Problem runing RBC_Est.mod
Posted: Wed Jan 13, 2010 2:26 am
Hello,
I am trying to introduce myself to Dynare and I am suing the User's guide for the Version 4.1 (the version I currently have); however, whiole running the RBC_Est.mod I have been having some troubles. I am using the simuldataRBC.m file which is obtained while runing the RBC_datagen.mod file. I am pasting the output and the errors I get while runing the RBC_Est.mod file below and the code I am using while runing it.
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
Starting Dynare (version 4.1.0).
Starting preprocessing of the model file ...
Found 9 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
You did not declare endogenous variables after the estimation command.
??? Attempted to access k(1); index out of bounds because numel(k)=0.
Error in ==> draw_prior_density at 93
binf = abscissa(k(1));
Error in ==> plot_priors at 52
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
Error in ==> dynare_estimation_1 at 87
plot_priors(bayestopt_,M_,options_)
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> puigvertrbcestimation at 133
dynare_estimation(var_list_);
Error in ==> dynare at 132
evalin('base',fname) ;
-----------------------------------------------------------------------------
The cose I am using is the following:
var y c k i l y_l w r z;
varexo e;
parameters beta psi delta alpha rho epsilon;
model;
(1/c)=beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l)=w;
c+i=y;
y=(k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w=y*((epsilon-1)/epsilon)*(1-alpha)/l;
r=y*((epsilon-1)/epsilon)*alpha/k(-1);
i=k-(1-delta)*k(-1);
y_l=y/l;
z=rho*z(-1)+e;
end;
varobs y;
initval;
k=9;
c=0.7;
l=0.3;
w=2.0;
r=0;
z=0;
e=0;
end;
estimated_params;
alpha, beta_pdf, 0.35, 0.02;
beta, beta_pdf, 0.9, 0.002;
delta, beta_pdf, 0.025, 0.003;
psi, gamma_pdf, 0.95, 0.05;
rho, beta_pdf, 0.95,0.05;
epsilon, gamma_pdf, 10, 0.003;
stderr e, inv_gamma_pdf, 0.01, inf;
end;
estimation (datafile=simuldataRBC,nobs=200, first_obs=500, mh_replic=2000, mh_drop=0.45, mh_jscale=0.;
--------------------------------------------------------------------------
Thanks a lot for your help,
Jonathan
I am trying to introduce myself to Dynare and I am suing the User's guide for the Version 4.1 (the version I currently have); however, whiole running the RBC_Est.mod I have been having some troubles. I am using the simuldataRBC.m file which is obtained while runing the RBC_datagen.mod file. I am pasting the output and the errors I get while runing the RBC_Est.mod file below and the code I am using while runing it.
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
Starting Dynare (version 4.1.0).
Starting preprocessing of the model file ...
Found 9 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
You did not declare endogenous variables after the estimation command.
??? Attempted to access k(1); index out of bounds because numel(k)=0.
Error in ==> draw_prior_density at 93
binf = abscissa(k(1));
Error in ==> plot_priors at 52
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
Error in ==> dynare_estimation_1 at 87
plot_priors(bayestopt_,M_,options_)
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> puigvertrbcestimation at 133
dynare_estimation(var_list_);
Error in ==> dynare at 132
evalin('base',fname) ;
-----------------------------------------------------------------------------
The cose I am using is the following:
var y c k i l y_l w r z;
varexo e;
parameters beta psi delta alpha rho epsilon;
model;
(1/c)=beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l)=w;
c+i=y;
y=(k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w=y*((epsilon-1)/epsilon)*(1-alpha)/l;
r=y*((epsilon-1)/epsilon)*alpha/k(-1);
i=k-(1-delta)*k(-1);
y_l=y/l;
z=rho*z(-1)+e;
end;
varobs y;
initval;
k=9;
c=0.7;
l=0.3;
w=2.0;
r=0;
z=0;
e=0;
end;
estimated_params;
alpha, beta_pdf, 0.35, 0.02;
beta, beta_pdf, 0.9, 0.002;
delta, beta_pdf, 0.025, 0.003;
psi, gamma_pdf, 0.95, 0.05;
rho, beta_pdf, 0.95,0.05;
epsilon, gamma_pdf, 10, 0.003;
stderr e, inv_gamma_pdf, 0.01, inf;
end;
estimation (datafile=simuldataRBC,nobs=200, first_obs=500, mh_replic=2000, mh_drop=0.45, mh_jscale=0.;
--------------------------------------------------------------------------
Thanks a lot for your help,
Jonathan