# Syntax Error help

**URL:** <https://forum.dynare.org/t/syntax-error-help/16544>\
**Category:** Stochastic simulations\
**Created:** [4 September 2020 00:47 UTC](https://forum.dynare.org/t/syntax-error-help/16544 "2020-09-04T00:47:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![syk2560](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e99b99/32.png) [@syk2560](https://forum.dynare.org/u/syk2560)\
**Post date:** [4 September 2020 00:47 UTC](https://forum.dynare.org/t/syntax-error-help/16544/1 "2020-09-04T00:47:46Z")

</div>

I am trying to simulate neoclassical growth model with leisure:

var c k lab z;

predetermined\_variables k;

varexo eps;

parameters beta theta delta alpha tau rho s sigma ;

beta=0.987;

theta=0.357;

delta=0.012;

alpha=0.4;

tau=2;

rho=0.95;

s=0.007;

sigma=0.2;

model;

z = rho \* z(-1) + s \* eps;

(c^theta \* (1 - lab)^(1-theta))^(1-tau)/c = beta \* ((c(+1)^theta \* (1-lab(+1))^(1-theta))^(1-tau)/c(+1)) \* (1+ alpha \* exp^z \* k^(alpha-1) \* lab^(1-alpha) - delta);

c = theta/1-theta \* (1-lab) \* (1-alpha) \* exp^z \* k^alpha \* lab^(-alpha);

k(+1) = exp^z \* k^alpha \* lab^(1-alpha) - c + (1-delta) \* k;

end;

initval;

k=1;

c=1;

lab=0.3;

z=0;

eps=0;

end;

check;

resid;

steady;

shocks;

var e = sigma^2;

stderr 1;

end;

stoch\_simul(order=2, irf=40);

I get this error: ERROR: NGM.mod: line 18, col 123: syntax error, unexpected POWER, expecting ‘(’

I can’t see where the mistake is.

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [4 September 2020 06:09 UTC](https://forum.dynare.org/t/syntax-error-help/16544/2 "2020-09-04T06:09:42Z")

</div>

Hi syk2560,

You need to write `exp(z)` to take the exponential function of `z`, not `exp^z`. You need to correct that in all of the equations in which that syntax mistake occurs.

Moreover, you need to provide sensible initial values to compute the steady state of the economy.
