Page 1 of 1

Schmitt-Grohe Uribe (2005)

PostPosted: Thu Oct 29, 2015 11:35 am
by cphstudent
Dear all

I'm trying to replicate the model from the Schmitt-Grohe & Uribe Optimal Inflation Stabilization in a Medium-Scale Macroeconomic Model. I've uploaded my .mod file and the appendix for the model. I've followed the model from section 2.4 (pp.24-25) in the appendix and used the steady state values in section 3 (pp.31-35).
I keep getting the same error when I run the program. As I can see others have also been troubling with this problem

Error using print_info (line 84)
Some updated params contain NaN or Inf

Error in resid (line 112)
print_info(info,options_.noprint, options_)

Error in steady (line 90)
resid;

Error in sgu (line 345)
steady;

Error in dynare (line 180)
evalin('base',fname) ;

I know that the error is due to how the parameters are executed in the steady_state_model block but I can't find the problem. If anyone can see and knows how to fix the problem it will be a great help!
I'm completely new in using Dynare so if someone could tell me if I'm missing something in my program generally it will be a great help too.

Thanks!

Mikkel

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Thu Oct 29, 2015 1:38 pm
by jpfeifer
Sequentially execute the calibration and steady state computation in Matlab with F9. You will see that my_zstar is not defined when you use it in
Code: Select all
    my_inv = my_upsilon*my_zstar;

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Thu Oct 29, 2015 9:30 pm
by cphstudent
Dear Mr. Pfeifer

Thank you for the comment. The error makes sense in my_inv sense m_zstar is endogenous and not defined. I've tried to fix the problem by removing the statement but the error isn't solved yet.
I don't fully understand how you can sequently execute the calibration and steady state? Do you just press F9 or can you do it by tapping one of the options in the upper panel in Matlab?

Thank you!

Mikkel

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Fri Oct 30, 2015 7:21 am
by jpfeifer
See http://www.dynare.org/phpBB3/viewtopic.php?f=2&t=5785
Now in
Code: Select all
    infl            = R*betta*my_lambda;

the R is not defined.

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Fri Oct 30, 2015 9:00 am
by cphstudent
Thank you for your reply.
Just to be sure; I have to copy paste my model into a .m file (see attached file) to find, which functions or variables that has not yet been defined? I've tried to do so, but Matlab just gives the following comment

"Undefined function or variable 'steady_state_model'."

without highlighting the specific function/variable.

What am I doing wrong?


Mikkel

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Fri Oct 30, 2015 6:29 pm
by jpfeifer
You cannot execute the whole file. You must mark the code you want to execute in Matlab and the press F9 or right-click and then select "Evaluate selection".

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Wed Nov 04, 2015 12:35 pm
by cphstudent
Ok, I've tried to do so, but Matlab doesn't tell you where the error occurs? Do you have to go through each equation by yourself to find the error?

Re: Schmitt-Grohe Uribe (2005)

PostPosted: Thu Nov 05, 2015 6:23 am
by jpfeifer
Yes