Errors on Smets-Wouters MoDEL

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 (2.13 KB)

Hi

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

Paolo

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

Hi

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

Paolo

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

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

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 (666 Bytes)

The line

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