Gali and Monacelli 2008

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:

[quote]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§-log(P(-1))
This implies that
log§=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. [/quote]

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
g_m_2008.mod (7.24 KB)

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 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?
NKM_withp.mod (7.34 KB)

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

Ah thanks, that solved the puzzle!