Gali and Monacelli 2008

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.

Re: Gali and Monacelli 2008

Postby jpfeifer » Sun Jan 10, 2016 4:10 pm

@chowshangyao What is the problem when you add
Code: Select all
p - p(-1) = ppi

@xyz There is no reason to suppose you cannot add a particular fiscal sector to the model.
------------
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: Gali and Monacelli 2008

Postby xyz » Wed Jan 13, 2016 4:07 pm

Dear Mr.Pfeifer,

when I add the equation you mentioned, I get the following error message again:

Error using print_info (line 80)
The steady state contains NaN or Inf
Error in steady (line 92)
print_info(info,options_.noprint, options_);
Error in g_m_2008_2 (line 218)
steady;
Error in dynare (line 180)
evalin('base',fname) ;

I am quite confused about this as I have seen equations like this in other models. Do you why it causes this error in my model?

Moreover, do you know why my impulse response functions differ from the ones presented in the paper? How do I model a 1% shock to technology?

Thank you very much for your support.

Kind regards
Attachments
g_m_2008_2.mod
(6.5 KiB) Downloaded 285 times
xyz
 
Posts: 12
Joined: Fri Dec 11, 2015 2:33 pm

Re: Gali and Monacelli 2008

Postby jpfeifer » Sat Feb 20, 2016 9:22 am

That is because the price level has a unit root and thus infinitely many possible steady states. You cannot endogenously compute it.

For a 1% technology shocks, set the standard deviation of the TFP shock to 0.01 in the shocks block.
------------
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: Gali and Monacelli 2008

Postby webinformation » Fri Mar 04, 2016 11:23 am

Nonetheless, I do not really understand why these equations cause so much trouble. Does anybody understand this? Unfortunately I think, the simulations based on your code do not produce the correct impulse response functions, do they? The output gap and the fiscal gap behave in the opposite way...

آگهی رایگان
طراحی سایت
دستگاه تصفیه آب
هاست
Last edited by webinformation on Wed Jun 15, 2016 5:30 pm, edited 1 time in total.
webinformation
 
Posts: 1
Joined: Fri Mar 04, 2016 11:22 am

Re: Gali and Monacelli 2008

Postby jpfeifer » Fri Mar 04, 2016 2:37 pm

As I said, you cannot try to compute something endogenously from the model when it is not uniquely determined. Only inflation is unique, but not the underlying price level.
------------
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: Gali and Monacelli 2008

Postby xyz » Thu Apr 14, 2016 10:30 am

Hi guys,

I am still working on this problem. I tried to solve it as suggested by Mr.Pfeifer in a post regarding a similar topic:


Re: How can deal inflation and price since prices donot has S.S

Postby jpfeifer » Sun Mar 30, 2014 8:27 am
In many models (e.g. interest rate rule) the price level is non-stationary, so you cannot have prices in the model. They will not return to a steady state. I am not sure what you want to do, but you can recover the IRF for prices from the inflation rates by noting the definition of prices. We have that
log(Pi)=log(P)-log(P(-1))
This implies that
log(P)=log(Pi)+log(P(-1)).
If you assume that P(0)=1, you can use the IRF for inflation to manually recover the price level. The procedure is similar to recovering the IRFs of nonstationary output after a permanent technology shock as shown in the Aguiar/Gopinath (2007) mod-file on my homepage.


I tried to do so by setting the initial values of the price equal to 1. Nonetheless, this is the error message I get:

Error using print_info (line 80)
The steady state contains NaN or Inf
Error in steady (line 92)
print_info(info,options_.noprint, options_);
Error in g_m_2008 (line 266)
steady;
Error in dynare (line 180)
evalin('base',fname) ;

Do you have any ideas how to solve this? Attached you find my code.

Regards
Attachments
g_m_2008.mod
(7.24 KiB) Downloaded 301 times
xyz
 
Posts: 12
Joined: Fri Dec 11, 2015 2:33 pm

Re: Gali and Monacelli 2008

Postby Palumenis » Fri Aug 19, 2016 3:38 pm

jpfeifer wrote:As I said, you cannot try to compute something endogenously from the model when it is not uniquely determined. Only inflation is unique, but not the underlying price level.


Sorry to take that up again, but I have a similar problem. What I do not understand from your answer is the following:
If I download the basic NKM model from your github site https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2008/Gali_2008_chapter_3.mod and add the following equation:

pi = p - p(-1);

it solves the model and in the policy function of p there is a 1 in front of p(-1), just as expected. Can you maybe help me understanding what the difference in the simple NKM is relative to the Gali Monacelli 2008? Why does it work in the former, but in the latter I get these NAs? Any idea?
Attachments
NKM_withp.mod
(7.34 KiB) Downloaded 199 times
Palumenis
 
Posts: 5
Joined: Mon Nov 18, 2013 1:55 pm

Re: Gali and Monacelli 2008

Postby jpfeifer » Fri Aug 19, 2016 4:30 pm

Essentially the difference is that my file provides a valid steady state (0 for everything) so that the steady state does not need to be endogenously computed. Dynare simply needs to confirm the correctness of the initial values (again 0).
------------
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: Gali and Monacelli 2008

Postby Palumenis » Mon Aug 22, 2016 9:55 am

Ah thanks, that solved the puzzle!
Palumenis
 
Posts: 5
Joined: Mon Nov 18, 2013 1:55 pm

Previous

Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 4 guests