# Simulation error

**URL:** <https://forum.dynare.org/t/simulation-error/1467>\
**Category:** Dynare help (legacy posts)\
**Created:** [26 May 2010 02:08 UTC](https://forum.dynare.org/t/simulation-error/1467 "2010-05-26T02:08:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adeem](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/7993a0/32.png) [@adeem](https://forum.dynare.org/u/adeem)\
**Post date:** [26 May 2010 02:08 UTC](https://forum.dynare.org/t/simulation-error/1467/1 "2010-05-26T02:08:41Z")

</div>

Hi,

I am a new user and running a simple model. I am getting the following partial simulation output. Kindly advise.

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.

Starting Dynare …  
Starting preprocessing of the model file …  
4 equation(s) found  
Processing derivation …  
Processing Order 1… done  
Processing Order 2… done  
Processing outputs …  
Preprocessing completed.  
Starting Matlab computing …

STEADY-STATE RESULTS:

q -0.0235798  
y -0.0754553  
r -0.264094  
m 0

EIGENVALUES:  
Modulus Real Imaginary

```
      0.7993 0.7993 0
         0.9 0.9 0
      0.9799 0.9799 0

```

There are 0 eigenvalue(s) larger than 1 in modulus  
for 0 forward-looking variable(s)

The rank condition is verified.

MODEL SUMMARY

Number of variables: 4  
Number of stochastic shocks: 3  
Number of state variables: 3  
Number of jumpers: 0  
Number of static variables: 1

MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS

Variables p g e  
p 0.000000 0.000000 0.000000  
g 0.000000 0.000000 0.000000  
e 0.000000 0.000000 0.000020

POLICY AND TRANSITION FUNCTIONS  
r q y m  
??? Reference to non-existent field ‘ghs2’.

Error in ==\> disp\_dr at 60  
x = x + dr.ghs2(ivar(i))/2;

Error in ==\> stoch\_simul at 65  
disp\_dr(oo\_.dr,options\_.order,var\_list);

Error in ==\> blanchard at 123  
info = stoch\_simul(var\_list\_);

Error in ==\> dynare at 102  
evalin(‘base’,fname) ;

Here is the model file:  
// Blanchard’s Partly Rational Model

var q y r m;  
varexo p g e;  
parameters a0 a1 c h s a b rho;  
a0=0.01;  
a1=0.05;  
c=3.5;  
h=5;  
s=0.03;  
a=0.8;  
b=0.25;  
rho=0.9;

// Model Equations - Endogenous Variables

model;  
y=y(-1)+s\*((a_q)-(b_y)+g);  
q=q(-1)+(r_q)-a0-(a1_y);  
r=(c_y)-h_(m-p);  
m=rho\*m(-1)+e;  
end;

// Steady state or initial value/s

initval;

q=1;  
y=0;  
r=0.05;  
e=0;  
m=0;  
end;

steady;

check;

// Define shocks

shocks;  
var e = 0.00002;  
end;

//Computation

stoch\_simul(periods=2100);

Kindly advise.

Regards,

Adeem

---

<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:** [26 May 2010 06:23 UTC](https://forum.dynare.org/t/simulation-error/1467/2 "2010-05-26T06:23:16Z")

</div>

Hi Adeem,  
Dynare does not support second order approximation for purely backward looking models (the version 4.1 gives you exactly this error message). Put

```auto
stoch_simul(order=1,periods=2100);
```

instead of

```auto
stoch_simul(periods=2100);
```

and it works on my machine.

Best regards

Johannes

---

<div class="post-metadata">

**Author:** ![adeem](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/7993a0/32.png) [@adeem](https://forum.dynare.org/u/adeem)\
**Post date:** [27 May 2010 02:15 UTC](https://forum.dynare.org/t/simulation-error/1467/3 "2010-05-27T02:15:33Z")

</div>

Thankyou indeed. It worked.

Adeem
