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.