Page 1 of 1
MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Fri Apr 17, 2015 6:21 pm
by samyd12345
Hi,
we are trying to replicate the base model of zanetti 2009:
http://users.ox.ac.uk/~wadh4073/researc ... b_2009.pdf However we are struggling to run the model, with the 'syntax error code on line 29'
the file has been attached, if anyone one could help us in what we are doing wrong it would be greatly appreciated! New on using dynare and have been stuck on this for a week now, trying to use his model for project for MSC course.
THANK YOU!
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Sun Apr 19, 2015 8:56 am
by jpfeifer
There is a semicolon missing after the initialization of X. Moreover, you are using a variable called cc in the model block, but you only defined c.
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Mon Apr 27, 2015 3:20 pm
by samyd12345
Hi,
We have managed to get past that problem however we get the following errors once we run dynare of:
>> dynare zanetti2.mod
Error using feval
Error: File: zanetti2_fff.m Line: 21 Column: 16
()-indexing must appear last in an index expression.
Error in dynare_solve (line 37)
fvec = feval(func,x,varargin{:});
Error in steady_ (line 23)
[ys_,check] = dynare_solve([fname_ '_fff'],x);
What is the problem now? We have made changes to it but are unsure of what is wrong this time round?
Error in steady (line 7)
steady_;
Error in zanetti2 (line 102)
steady(0);
Error in dynare (line 26)
evalin('base',fname) ;
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 5:08 am
by jpfeifer
You need to provide the mod-file not the generated m-file.
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 8:28 am
by samyd12345
hi,
sorry, here is the mod file
Thank You
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 12:48 pm
by jpfeifer
Moreover, you are using a variable called cc in the model block, but you only defined c.
Or did you upload an old file?
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 4:21 pm
by samyd12345
Hi,
i just changed the file to the following in the attachment but it still gives me this error codes but now with slightly different lines:
>> dynare zanetti2.mod
Error using feval
Error: File: zanetti2_fff.m Line: 21 Column: 22
()-indexing must appear last in an index expression.
Error in dynare_solve (line 37)
fvec = feval(func,x,varargin{:});
Error in steady_ (line 23)
[ys_,check] = dynare_solve([fname_ '_fff'],x);
Error in steady (line 7)
steady_;
Error in zanetti2 (line 104)
steady(0);
Error in dynare (line 26)
evalin('base',fname) ;
is it possible to have something to do with the equation in our model: exp(xx)= h/u; , line 23?
Or i have a feeling it may have something to with the steady state values?
Thank You
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 4:45 pm
by jpfeifer
I get
- Code: Select all
ERROR: zanetti2.mod: line 23, col 10: Unknown symbol: h
Regarding the other error: try placing the mod-file in a new folder so that no other files are located there. Because it seems you have created some strange conflicts. Or do you know that
zanetti2_fff
is?
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 5:15 pm
by samyd12345
i am not sure what zanetti2_fff is, when i type 'dynare zanetti2.mod' on mathlab it seems to create 'zanetti2_fff' on the left hand side under current folder
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Tue Apr 28, 2015 7:42 pm
by jpfeifer
It seems you have inadvertently changed dynare.m. Please reinstall Dynare.
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Thu Apr 30, 2015 11:32 am
by samyd12345
Hi,
I dont think that is the issue, since i have a different mod file from a previous project and that runs fine on dynare with it giving the impulse response functions etc.
Could it possibly have something to do with the steady states since i am not very sure on them. Do we have to include a steady state value for every variable in our model, since in the paper it has given values for only some of them but not for variables gg or pp, which we assume to be =0. How do you actually find/calculate these steady state values?
Thank You
Re: MSC STUDENT PROJECT ZANETTI 2009 HELP
Posted:
Fri May 01, 2015 6:32 pm
by jpfeifer
Which Dynare version are you using? I am not aware of any version that has in steady_.m a call to
- Code: Select all
[ys_,check] = dynare_solve([fname_ '_fff'],x);