# Problems with example RBC\_Est.mod

**URL:** <https://forum.dynare.org/t/problems-with-example-rbc-est-mod/2548>\
**Category:** Dynare help (legacy posts)\
**Created:** [30 May 2012 08:52 UTC](https://forum.dynare.org/t/problems-with-example-rbc-est-mod/2548 "2012-05-30T08:52:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucianojcampos](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/49beb7/32.png) [@lucianojcampos](https://forum.dynare.org/u/lucianojcampos)\
**Post date:** [30 May 2012 08:52 UTC](https://forum.dynare.org/t/problems-with-example-rbc-est-mod/2548/1 "2012-05-30T08:52:33Z")

</div>

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:

```auto
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,

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [5 June 2012 07:04 UTC](https://forum.dynare.org/t/problems-with-example-rbc-est-mod/2548/2 "2012-06-05T07:04:08Z")

</div>

You are missing the datafile for estimation.

---

<div class="post-metadata">

**Author:** ![lucianojcampos](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/49beb7/32.png) [@lucianojcampos](https://forum.dynare.org/u/lucianojcampos)\
**Post date:** [6 June 2012 09:04 UTC](https://forum.dynare.org/t/problems-with-example-rbc-est-mod/2548/3 "2012-06-06T09:04:32Z")

</div>

Ok, thanks a lot for your answer.

best

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [7 January 2013 17:02 UTC](https://forum.dynare.org/t/problems-with-example-rbc-est-mod/2548/4 "2013-01-07T17:02:28Z")

</div>

See [[File simuldataRBC](https://forum.dynare.org/t/file-simuldatarbc/460/1))
