Page 1 of 1

Problems with example RBC_Est.mod

PostPosted: Wed May 30, 2012 8:52 am
by lucianojcampos
Hi, I'm having some problems to run the RBC_Est.mod file of the Dynare site examples. I've downloaded Dynare version 4.2 and I run it with Matlab 7.9. I've saved the Dynare toolbox in the default installation directory:

C:\dynare\4.2.2

While the example RBC_Est.mod file has been saved in another directory.

I first type the command:

addpath c:\dynare\4.2.2\matlab

and then:

dynare RBC_Est

I do not modify the mod file I download from Dynare's site. I post it here just in case:

Code: Select all
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.76;
  l = 0.3;
  w = 2.07;
  r = 0.03;
  z = 0;
  e = 0;
end;

estimated_params;
alpha, beta_pdf, 0.35, 0.02;
beta, beta_pdf, 0.99, 0.002;
delta, beta_pdf, 0.025, 0.003;
psi, gamma_pdf, 1.75, 0.02;
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_nblocks=2,mh_drop=0.45,mh_jscale=0.8,mode_compute=6);


I get the following error message:

You did not declare endogenous variables after the estimation command.
This version of Dynare cannot estimate non linearized models!
Set "order" equal to 1.

??? Error using ==> read_variables at 84
Can't find datafile: simuldataRBC

Error in ==> dynare_estimation_init at 290
rawdata =
read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation_1 at 37
[data,rawdata,xparam1] = dynare_estimation_init(var_list_);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> RBC_Est at 135
dynare_estimation(var_list_);

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


Even if I set order=1 in the estimation command, I still get the same error message.

I'd appreciate if someone could tell me what might be going on.

Thanks a lot!

best,

Re: Problems with example RBC_Est.mod

PostPosted: Tue Jun 05, 2012 7:04 am
by jpfeifer
You are missing the datafile for estimation.

Re: Problems with example RBC_Est.mod

PostPosted: Wed Jun 06, 2012 9:04 am
by lucianojcampos
Ok, thanks a lot for your answer.

best

Re: Problems with example RBC_Est.mod

PostPosted: Mon Jan 07, 2013 5:02 pm
by jpfeifer