syntax error, unexpected COMMA, expecting EQUAL

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

syntax error, unexpected COMMA, expecting EQUAL

Postby dongji87 » Tue Aug 30, 2011 2:26 pm

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!
Attachments
fs2000.mod
(4.24 KiB) Downloaded 218 times
fs2000.m
(4.81 KiB) Downloaded 146 times
dongji87
 
Posts: 13
Joined: Fri Aug 26, 2011 7:28 am

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby jpfeifer » Tue Aug 30, 2011 3:20 pm

The command in line 122 should be
Code: Select all
estimated_params;

not
Code: Select all
estimated parameters;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby StephaneAdjemian » Tue Aug 30, 2011 3:27 pm

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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby dongji87 » Tue Aug 30, 2011 6:34 pm

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!
dongji87
 
Posts: 13
Joined: Fri Aug 26, 2011 7:28 am

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby dongji87 » Tue Aug 30, 2011 6:36 pm

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!
dongji87
 
Posts: 13
Joined: Fri Aug 26, 2011 7:28 am

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby dongji87 » Tue Aug 30, 2011 6:37 pm

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!
dongji87
 
Posts: 13
Joined: Fri Aug 26, 2011 7:28 am

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby dongji87 » Wed Aug 31, 2011 2:50 pm

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
dongji87
 
Posts: 13
Joined: Fri Aug 26, 2011 7:28 am

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby StephaneAdjemian » Thu Sep 01, 2011 8:39 am

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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: syntax error, unexpected COMMA, expecting EQUAL

Postby dongji87 » Thu Sep 01, 2011 10:48 am

Thanks professor, I will have a try!Good Luck.
Yours, Qingyin Ma
dongji87
 
Posts: 13
Joined: Fri Aug 26, 2011 7:28 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests