Page 1 of 1

Errors on Smets-Wouters MoDEL

PostPosted: Tue Dec 09, 2008 4:02 am
by sunrain
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

Re: Errors on Smets-Wouters MoDEL

PostPosted: Thu Dec 11, 2008 4:32 pm
by p.gelain
Hi

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

Paolo

Re: Errors on Smets-Wouters MoDEL

PostPosted: Fri Dec 12, 2008 3:50 am
by sunrain
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

Re: Errors on Smets-Wouters MoDEL

PostPosted: Fri Dec 12, 2008 10:39 am
by p.gelain
Hi

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

Paolo

Re: Errors on Smets-Wouters MoDEL

PostPosted: Thu Dec 25, 2008 3:22 am
by sunrain
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

Re: Errors on Smets-Wouters MoDEL

PostPosted: Fri Dec 26, 2008 2:38 am
by sunrain
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

Re: Errors on Smets-Wouters MoDEL

PostPosted: Mon Dec 13, 2010 2:35 pm
by martin
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...

Re: Errors on Smets-Wouters MoDEL

PostPosted: Mon Dec 13, 2010 5:55 pm
by jpfeifer
The line
Code: Select all
1/(c)^epsilon = mu*(1+gamma)*(zz)^gamma;

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