Schmitt-Grohe Uribe (2005)

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.

Schmitt-Grohe Uribe (2005)

Postby cphstudent » Thu Oct 29, 2015 11:35 am

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
Attachments
(1) Technical appendix to main paper.pdf
(723.21 KiB) Downloaded 209 times
sgu_steadystate2.m
(2.36 KiB) Downloaded 174 times
sgu.mod
(6.68 KiB) Downloaded 198 times
cphstudent
 
Posts: 4
Joined: Thu Oct 29, 2015 10:45 am

Re: Schmitt-Grohe Uribe (2005)

Postby jpfeifer » Thu Oct 29, 2015 1:38 pm

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;
------------
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: Schmitt-Grohe Uribe (2005)

Postby cphstudent » Thu Oct 29, 2015 9:30 pm

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
Attachments
sgu.mod
(6.58 KiB) Downloaded 178 times
cphstudent
 
Posts: 4
Joined: Thu Oct 29, 2015 10:45 am

Re: Schmitt-Grohe Uribe (2005)

Postby jpfeifer » Fri Oct 30, 2015 7:21 am

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.
------------
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: Schmitt-Grohe Uribe (2005)

Postby cphstudent » Fri Oct 30, 2015 9:00 am

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
Attachments
1sgu.mod
(6.58 KiB) Downloaded 158 times
1sgu.m
(6.57 KiB) Downloaded 177 times
cphstudent
 
Posts: 4
Joined: Thu Oct 29, 2015 10:45 am

Re: Schmitt-Grohe Uribe (2005)

Postby jpfeifer » Fri Oct 30, 2015 6:29 pm

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".
------------
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: Schmitt-Grohe Uribe (2005)

Postby cphstudent » Wed Nov 04, 2015 12:35 pm

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?
cphstudent
 
Posts: 4
Joined: Thu Oct 29, 2015 10:45 am

Re: Schmitt-Grohe Uribe (2005)

Postby jpfeifer » Thu Nov 05, 2015 6:23 am

Yes
------------
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 contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests