After starting dynare,the result shows Eorror,How to correct

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.

After starting dynare,the result shows Eorror,How to correct

Postby luhuihang » Sat Mar 05, 2016 1:48 pm

I used the dynare for the first time, when I finished all the code,I run the . mod in matlab,but the result shows:
ERROR: articlepart.mod: line 1, col 65: syntax error, unexpected TIMES

错误使用 dynare (line 174)
DYNARE: preprocessing failed

please tell me how to correct the code?!!!
[code][/code]
Attachments
articlepart.mod
this is my code
(2.9 KiB) Downloaded 54 times
luhuihang
 
Posts: 6
Joined: Sat Mar 05, 2016 1:37 pm

Re: After starting dynare,the result shows Eorror,How to cor

Postby jpfeifer » Sun Mar 06, 2016 6:07 pm

Check line 1, column 65. There you have a variable
mc_*

The times (*) is a reserved character used for multiplication. You cannot use it to name a variable. Call the variable e.g.
Code: Select all
mc_star

instead
------------
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: After starting dynare,the result shows Eorror,How to cor

Postby luhuihang » Mon Mar 07, 2016 9:02 am

jpfeifer wrote:Check line 1, column 65. There you have a variable
mc_*

The times (*) is a reserved character used for multiplication. You cannot use it to name a variable. Call the variable e.g.
Code: Select all
mc_star

instead[/qu
Thank you so much !
After I corrected all my eorrors in the code ,the newest problem is as follows:

WARNING: example2.mod:25.5-108: Symbol a declared twice.
Substitution of endo lags >= 2: added 3 auxiliary variables and equations.
ERROR: There are 29 equations but 33 endogenous variables!

but I can't find another equations ,could you please help me ?
Attachments
example2.mod
here is the new code
(3.73 KiB) Downloaded 53 times
luhuihang
 
Posts: 6
Joined: Sat Mar 05, 2016 1:37 pm

Re: After starting dynare,the result shows Eorror,How to cor

Postby jpfeifer » Mon Mar 07, 2016 5:52 pm

Sorry, but I don't know your model. There must be as many equations as variables. Only economic intuition can tell you what is missing. Maybe you should start with a simpler version of your model.
------------
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: After starting dynare,the result shows Eorror,How to cor

Postby luhuihang » Tue Mar 08, 2016 1:59 pm

jpfeifer wrote:Sorry, but I don't know your model. There must be as many equations as variables. Only economic intuition can tell you what is missing. Maybe you should start with a simpler version of your model.

I'm sorry to disturb you again ,I simplyfied my model ,but here is the new problem:
警告: Some of the parameters have no value (alpha_cb) when using steady. If these parameters are not initialized in a steadystate file,
Dynare may not be able to solve the model...
> In test_for_deep_parameters_calibration at 46
In steady at 33
In example2 at 301
In dynare at 180
STEADY: numerical initial values or parameters incompatible with the following equations
6 12

Check whether your model in truly linear




Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : NaN
Equation number 5 : 0
Equation number 6 : NaN
Equation number 7 : Inf
Equation number 8 : NaN
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : NaN
Equation number 12 : NaN
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0

I checked my model for several times, my model is in linear,is the initial values wrong?
luhuihang
 
Posts: 6
Joined: Sat Mar 05, 2016 1:37 pm

Re: After starting dynare,the result shows Eorror,How to cor

Postby jpfeifer » Thu Mar 10, 2016 10:24 am

Please check what happens with
Code: Select all
alpha_cb

and why it is NaN. Otherwise, please provide the files
------------
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: After starting dynare,the result shows Eorror,How to cor

Postby luhuihang » Sat Mar 12, 2016 2:32 pm

jpfeifer wrote:Please check what happens with
Code: Select all
alpha_cb

and why it is NaN. Otherwise, please provide the files

Could you please download my file and code to help me find the mistake?
Thank you so much !
Attachments
DSGE file +code.rar
(48.15 KiB) Downloaded 77 times
luhuihang
 
Posts: 6
Joined: Sat Mar 05, 2016 1:37 pm

Re: After starting dynare,the result shows Eorror,How to cor

Postby jpfeifer » Tue Mar 15, 2016 8:14 am

Use
Code: Select all
resid;

before
Code: Select all
steady;

to see
Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : -Inf

Equation 6 with its division by variables
Code: Select all
/((1+beta)*gamma_w*((1+(thet/phi)))*((1/phi)*n+(c/sigma)-w)))

is clearly not a linear equation and imcompatible with 0 being a steady state.
------------
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: After starting dynare,the result shows Eorror,How to cor

Postby luhuihang » Wed Mar 16, 2016 8:55 am

jpfeifer wrote:Use
Code: Select all
resid;

before
Code: Select all
steady;

to see
Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : -Inf

Equation 6 with its division by variables
Code: Select all
/((1+beta)*gamma_w*((1+(thet/phi)))*((1/phi)*n+(c/sigma)-w)))

is clearly not a linear equation and imcompatible with 0 being a steady state.



Thank you so much ,I have found the mistake and corrected it ,Now the dynare can run .
luhuihang
 
Posts: 6
Joined: Sat Mar 05, 2016 1:37 pm

Re: After starting dynare,the result shows Eorror,How to cor

Postby luhuihang » Thu Mar 17, 2016 1:54 pm

I 'm so sorry to bother you again,after I run the dynare,it produces several figures ,but I can only write different code which just change the interest rate rules.The whole article is going to discuss changes of the GDP , consumption in Taylor rules , forward rule and backward rule.I wonder how can i get these three lines in one figure to show the differences under different interest rate rule? What should I add in the dynare code to let three lines shown in one figure?
Thanks for your help!
I attached my three codes.
Attachments
code.rar
three codes
(4.39 KiB) Downloaded 68 times
luhuihang
 
Posts: 6
Joined: Sat Mar 05, 2016 1:37 pm

Re: After starting dynare,the result shows Eorror,How to cor

Postby jpfeifer » Fri Mar 18, 2016 8:32 am

There is no way to implement this in Dynare directly. However, Dynare saves all impulse responses in the results structure oo_. You can always run and then plot them yourself.
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 14 guests