MSC STUDENT PROJECT ZANETTI 2009 HELP

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.

MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby samyd12345 » Fri Apr 17, 2015 6:21 pm

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!
Attachments
zanetti2.mod
(1.5 KiB) Downloaded 88 times
samyd12345
 
Posts: 8
Joined: Fri Apr 17, 2015 6:04 pm

Re: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby jpfeifer » Sun Apr 19, 2015 8:56 am

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.
------------
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: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby samyd12345 » Mon Apr 27, 2015 3:20 pm

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) ;
Attachments
zanetti2.m
(2.01 KiB) Downloaded 83 times
samyd12345
 
Posts: 8
Joined: Fri Apr 17, 2015 6:04 pm

Re: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby jpfeifer » Tue Apr 28, 2015 5:08 am

You need to provide the mod-file not the generated m-file.
------------
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: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby samyd12345 » Tue Apr 28, 2015 8:28 am

hi,

sorry, here is the mod file

Thank You
Attachments
zanetti2.mod
(1.4 KiB) Downloaded 82 times
samyd12345
 
Posts: 8
Joined: Fri Apr 17, 2015 6:04 pm

Re: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby jpfeifer » Tue Apr 28, 2015 12:48 pm

Moreover, you are using a variable called cc in the model block, but you only defined c.

Or did you upload an old file?
------------
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: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby samyd12345 » Tue Apr 28, 2015 4:21 pm

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
Attachments
zanetti2.mod
(1.41 KiB) Downloaded 90 times
samyd12345
 
Posts: 8
Joined: Fri Apr 17, 2015 6:04 pm

Re: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby jpfeifer » Tue Apr 28, 2015 4:45 pm

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?
------------
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: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby samyd12345 » Tue Apr 28, 2015 5:15 pm

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
samyd12345
 
Posts: 8
Joined: Fri Apr 17, 2015 6:04 pm

Re: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby jpfeifer » Tue Apr 28, 2015 7:42 pm

It seems you have inadvertently changed dynare.m. Please reinstall Dynare.
------------
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: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby samyd12345 » Thu Apr 30, 2015 11:32 am

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
samyd12345
 
Posts: 8
Joined: Fri Apr 17, 2015 6:04 pm

Re: MSC STUDENT PROJECT ZANETTI 2009 HELP

Postby jpfeifer » Fri May 01, 2015 6:32 pm

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);
------------
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: Google [Bot] and 8 guests