Page 1 of 1

syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Tue Aug 30, 2011 2:26 pm
by dongji87
Hi, everyone!
I have a prblem now. An error always occur while i was running my program, which includes bayesian estimation. I followed the syntax of bayesian estimation and wrote stringently. Nothing in line 123 seems to be wrong, but dynare reports "syntax error, unexpected COMMA, expecting EQUAL" . Like the folllowing:

>> dynare fs2000

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.2.1).
Starting preprocessing of the model file ...
ERROR: fs2000.mod:123.2: syntax error, unexpected COMMA, expecting EQUAL

??? Error using ==> dynare at 126
DYNARE: preprocessing failed


Could you please help me! Thanks a lot!

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Tue Aug 30, 2011 3:20 pm
by jpfeifer
The command in line 122 should be
Code: Select all
estimated_params;

not
Code: Select all
estimated parameters;

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Tue Aug 30, 2011 3:27 pm
by StephaneAdjemian
Hi, I found a lot of errors in your mod file... I won't correct all of them...

There are typos in the block where the estimated parameters are declared. The name of the block is not

Code: Select all
estimated parameters;


but

[*]
Code: Select all
estimated_params;


You have to replace on the second line of this block

Code: Select all
narmal_pdf


by

Code: Select all
normal_pdf


don't forget the comma. Also you are using a variable beta before the model block. This parameter is not declared or initialized. So Dynare interprets beta as a matlab instruction... And dynare (matlab) crashes because the beta function needs (at least) two input arguments. I replaced beta by parameter bet.

There is still a problem with the steady state because you did not initialized all the parameters.

Best,
Stéphane.

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Tue Aug 30, 2011 6:34 pm
by dongji87
Thank you so much, friends! I am a new comer of Dynare, and I feel so lucky to meet you all! Best regards to you!

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Tue Aug 30, 2011 6:36 pm
by dongji87
StephaneAdjemian wrote:Hi, I found a lot of errors in your mod file... I won't correct all of them...

There are typos in the block where the estimated parameters are declared. The name of the block is not

Code: Select all
estimated parameters;


but

[*]
Code: Select all
estimated_params;


You have to replace on the second line of this block

Code: Select all
narmal_pdf


by

Code: Select all
normal_pdf


don't forget the comma. Also you are using a variable beta before the model block. This parameter is not declared or initialized. So Dynare interprets beta as a matlab instruction... And dynare (matlab) crashes because the beta function needs (at least) two input arguments. I replaced beta by parameter bet.

There is still a problem with the steady state because you did not initialized all the parameters.

Best,
Stéphane.


Thank you so much, friend! I am a new comer of Dynare, and I feel so lucky to meet you ! Best regards to you!

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Tue Aug 30, 2011 6:37 pm
by dongji87
jpfeifer wrote:The command in line 122 should be
Code: Select all
estimated_params;

not
Code: Select all
estimated parameters;

Thank you, friend. I will correct them!

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Wed Aug 31, 2011 2:50 pm
by dongji87
StephaneAdjemian wrote:Hi, I found a lot of errors in your mod file... I won't correct all of them...
Best,
Stéphane.

Hello, Professor Adjemian. I have sent an email to you, is this the right email address? stephane.adjemian@ens.fr.
In this email, I sent you the a word file of my whole model, and there is the new .mod file I have corrected. Maybe there is still some stupid mistakes, please forgive me for that. I hope you have a look at my model and give me some suggestions. Is there something unreasonable with my model specification, which caused dynare to crash? Why I always cannot get a steady state and face a spurious convergence problem?
If you need anything else, just tell me, I will cooperate. Thanks very much!

yours, Qingyin, Ma

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Thu Sep 01, 2011 8:39 am
by StephaneAdjemian
Dear Qingyin,

It's probably a problem with the choice of the initial values for the endogenous variables. You have to try different values... But the best approach would be to compute the steady state analytically and to provide the closed form expression to dynare (you will find a lot of
posts on this forum describing how to do this). Even if there is no closed form solution for the steady state, you can always concentrate the
problem and solve a smaller set of non linear equations (you have then to use a steadystate file, you will also find examples for this on the forum).

Best,
Stéphane.

Re: syntax error, unexpected COMMA, expecting EQUAL

PostPosted: Thu Sep 01, 2011 10:48 am
by dongji87
Thanks professor, I will have a try!Good Luck.
Yours, Qingyin Ma