Page 1 of 1

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

PostPosted: Sat Mar 05, 2016 1:48 pm
by luhuihang
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]

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

PostPosted: Sun Mar 06, 2016 6:07 pm
by jpfeifer
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

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

PostPosted: Mon Mar 07, 2016 9:02 am
by luhuihang
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 ?

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

PostPosted: Mon Mar 07, 2016 5:52 pm
by jpfeifer
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.

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

PostPosted: Tue Mar 08, 2016 1:59 pm
by luhuihang
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?

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

PostPosted: Thu Mar 10, 2016 10:24 am
by jpfeifer
Please check what happens with
Code: Select all
alpha_cb

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

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

PostPosted: Sat Mar 12, 2016 2:32 pm
by luhuihang
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 !

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

PostPosted: Tue Mar 15, 2016 8:14 am
by jpfeifer
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.

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

PostPosted: Wed Mar 16, 2016 8:55 am
by luhuihang
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 .

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

PostPosted: Thu Mar 17, 2016 1:54 pm
by luhuihang
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.

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

PostPosted: Fri Mar 18, 2016 8:32 am
by jpfeifer
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.