Error : Ramsey problem with get_ramsey

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.

Error : Ramsey problem with get_ramsey

Postby ebaykal » Thu Aug 20, 2009 8:51 pm

Hi everyone,
I am currently working on a model where I want to get Ramsey solution to it.
I calculated the steady state of the lagrange multipliers provided by the get_ramsey code. They are accurately calculated in the firesales_out_lmss.m file. Then I modified the model file "firesales_out.mod" as suggested in the instructions in get_ramsey. However, when I run the code, I get the following error:

??? Undefined function or variable 'exo_nbr'.

Error in ==> firesales_out at 189
if exo_nbr > 0;

Error in ==> dynare at 26
evalin('base',fname) ;


I checked the file firesales_out.m, exo_nbr is defined as a global variable and is given equal to 2 at line 95 (before the error line 189). It seems that there should not be a problem with this variable. I cannot figure out what is really wrong.

I am attaching the file firesales_out.m here. I would greatly appreciate if you could help me with this problem. I am stuck with a problem but I have no idea where this problem comes from. I googled it, looked into dynare forum, but again no answer was helpful to figure out the problem.

The file "modifiednewapproach" is the original file with an exogenous policy rule. The file firesale.mod is the file for get_ramsey. I calculate the steady state of the model with parameterfun.m and steadystate12.m. firesales_ss.m file computes the steady the of the model variables and creates var_SS to be used in firesales_out_lmss.m.

Thanks so much for your help in advance.
Attachments
firesales_out.m
(5.33 KiB) Downloaded 108 times
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm

Re: Error : Ramsey problem with get_ramsey

Postby SébastienVillemot » Mon Aug 24, 2009 1:20 pm

Hi,

The get_ramsey code was not written by the Dynare team, so we can't provide much help.

However, I would suggest that you upgrade to Dynare 4.0.4, and give a try to the new way of computing Ramsey policy.
See:
http://www.dynare.org/DynareWiki/OptimalPolicy

Hope this can help.

Best,

Sébastien
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Error : Ramsey problem with get_ramsey

Postby ebaykal » Mon Aug 24, 2009 3:38 pm

Thanks for the response. The model I am working is pretty big so I do not know if I am going to be able to get the ramsey policy rule to my model.
But I tried to run the first model given in the link you posted. I get the following error:

??? Error using ==> dynare at 19
ERROR: there are 2 equations for 3 endogenous variables

I am currently using version dynare 4.0.3 and Matlab 2008a. I am running Matlab on Windows 32bit. Is the error related to version of dynare or am I supposed to do something else to run this mod file?

Also, on the dynare web, it says

What doesn't work

* optimal policy rules
* using Matlab functions beyond power, log(), exp(), sqrt(), sin(), cos(), tan()
* some mixing of Matlab code inside the *.mod file
* the manual isn't updated


I am a little bit lost here. I will greatly appreciate any clarification on this issue.
Elif ONMUS-BAYKAL
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm

Re: Error : Ramsey problem with get_ramsey

Postby ebaykal » Mon Aug 24, 2009 3:45 pm

I also tried the same file given in DynareWiki in dynare 4.0.4. I am still getting the same error:

??? Error using ==> dynare at 19
ERROR: there are 2 equations for 3 endogenous variables

Any help?

Thanks,

Elif.
Elif ONMUS-BAYKAL
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm

Re: Error : Ramsey problem with get_ramsey

Postby SébastienVillemot » Tue Aug 25, 2009 8:06 am

I have just tested this file with Dynare 4.0.4 and it works.

My guess is that older versions of Dynare are still present in your MATLAB path.

Please check your path, and then type "dynare_version" at the MATLAB prompt.

Best,

Sébastien
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Error : Ramsey problem with get_ramsey

Postby ebaykal » Tue Aug 25, 2009 6:56 pm

Hi Sebastien

Thanks for your help. I have both version 3 and version 4 on my computer. I will try it again.

Best,
Elif.
Elif ONMUS-BAYKAL
ebaykal
 
Posts: 22
Joined: Mon Feb 09, 2009 4:58 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 15 guests