# Errors on Smets-Wouters MoDEL

**URL:** <https://forum.dynare.org/t/errors-on-smets-wouters-model/880>\
**Category:** Dynare help (legacy posts)\
**Created:** [9 December 2008 04:02 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880 "2008-12-09T04:02:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunrain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/779978/32.png) [@sunrain](https://forum.dynare.org/u/sunrain)\
**Post date:** [9 December 2008 04:02 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/1 "2008-12-09T04:02:11Z")

</div>

Dear All,

As a beginner, I’m trying to operate linear Smets-Wouter model with dynare 4.01 on matlab 2007a; I got following messages:  
dynare sw

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

Starting Dynare …  
Starting preprocessing of the model file …  
ERROR: sw.mod:12.0-1: syntax error, unexpected NAME

??? Error using ==\> dynare at 96  
DYNARE: preprocessing failed

I checked my code detailed, but could not find any unexpected name. Could anyone provide helps? Thanks!

See attached code

Lukas  
[sw.mod](https://forum.dynare.org/uploads/default/original/1X/715fe3f86188b56876bbcf8689efd9168abf4fa0.mod) (2.13 KB)

---

<div class="post-metadata">

**Author:** ![p.gelain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/439d5e/32.png) [@p.gelain](https://forum.dynare.org/u/p.gelain)\
**Post date:** [11 December 2008 16:32 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/2 "2008-12-11T16:32:43Z")

</div>

Hi

you simply forgot to put the SEMICOLON at the end of the line 11 (invy=0.22)

Paolo

---

<div class="post-metadata">

**Author:** ![sunrain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/779978/32.png) [@sunrain](https://forum.dynare.org/u/sunrain)\
**Post date:** [12 December 2008 03:50 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/3 "2008-12-12T03:50:32Z")

</div>

Paolo,  
Thanks. But after I added the semicolon in line11, I operated it on Matalab 2007a with dyanre 4.02, It still told  
dynare sw

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

Starting Dynare …  
Starting preprocessing of the model file …  
ERROR: sw.mod:47.103: syntax error, unexpected NAME, expecting INT\_NUMBER or MINUS or PLUS

??? Error using ==\> dynare at 96  
DYNARE: preprocessing failed

---

<div class="post-metadata">

**Author:** ![p.gelain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/439d5e/32.png) [@p.gelain](https://forum.dynare.org/u/p.gelain)\
**Post date:** [12 December 2008 10:39 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/4 "2008-12-12T10:39:52Z")

</div>

Hi

you have written p(t-1) instead of p(-1).

Paolo

---

<div class="post-metadata">

**Author:** ![sunrain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/779978/32.png) [@sunrain](https://forum.dynare.org/u/sunrain)\
**Post date:** [25 December 2008 03:22 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/5 "2008-12-25T03:22:56Z")

</div>

Dear Paolo,

Thanks! I got the results.

Another question, could you tell me how to match the observable data with the variable in the **_linear_** model?

When I conducted estimation in dynare with same model, I always got the wrong information, saying that an unexpexted parenthesis in the regarding .m file.

Thanks again.

Lukas

---

<div class="post-metadata">

**Author:** ![sunrain](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/779978/32.png) [@sunrain](https://forum.dynare.org/u/sunrain)\
**Post date:** [26 December 2008 02:38 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/6 "2008-12-26T02:38:38Z")

</div>

dynare bsw

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

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

??? Error: File: bsw.m Line: 313 Column: 1  
Unbalanced or unexpected parenthesis or bracket.

“Error in ==\> dynare at 102  
evalin(‘base’,fname) ;  
var\_list\_=];  
dynare\_estimation(var\_list\_);  
_);_  
save(‘bsw\_results.mat’, ‘oo\_’);  
diary off”

When I deleted the parenthesis in bsw.m, and conducted bsw.m  
it said:  
STEADY: numerical initial values incompatible with the following equations  
2 4

??? Error using ==\> dynare\_solve at 82  
exiting …

Error in ==\> steady\_ at 69  
[oo\_.steady\_state,check] = dynare\_solve([M\_.fname ‘\_static’],…

Error in ==\> steady at 52  
steady\_;

Error in ==\> bsw at 247  
steady;

what’s the problem?

Thanks,

Lukas

---

<div class="post-metadata">

**Author:** ![martin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@martin](https://forum.dynare.org/u/martin)\
**Post date:** [13 December 2010 14:35 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/7 "2010-12-13T14:35:45Z")

</div>

Hey guys

I get kind of the same troubles with my own model (the mod file is attached)… I obtain the following error message:

ERROR: aghionhowitt.mod:22.0: syntax error, unexpected INT\_NUMBER  
Starting Dynare (version 4.1.3).  
Starting preprocessing of the model file …

error: DYNARE: preprocessing failed  
error: called from:  
error: /Applications/Dynare/4.1.3/matlab/dynare.m at line 126, column 1

I don’t really understand the “unexpected INT\_NUMBER” comment. Regarding what I’ve seen up here, it seems that some variable is not well-defined or should get a time lag, but I really can’t find where!

Thanks for your help

Martin

PS: the program is not really finished, I just want to get rid of those syntax errors for the moment…  
[aghionhowitt.mod](https://forum.dynare.org/uploads/default/original/1X/926fe63c228b6d2398f945f8918ee7916f31666c.mod) (666 Bytes)

---

<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:** [13 December 2010 17:55 UTC](https://forum.dynare.org/t/errors-on-smets-wouters-model/880/8 "2010-12-13T17:55:04Z")

</div>

The line

```auto

```

in the endval block is not a correct assignment for c. Solve the equation for c.
