Schmitt-Grohe Uribe (2005)

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
(1) Technical appendix to main paper.pdf (723 KB)
sgu_steadystate2.m (2.36 KB)
sgu.mod (6.68 KB)

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

my_inv = my_upsilon*my_zstar;

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
sgu.mod (6.58 KB)

See [The generalized Schur (QZ))
Now in

infl = R*betta*my_lambda;
the R is not defined.

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
1sgu.mod (6.58 KB)
1sgu.m (6.57 KB)

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”.

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?

Yes