Page 2 of 2

Re: Gali and Monacelli 2008

PostPosted: Sun Jan 10, 2016 4:10 pm
by jpfeifer
@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.

Re: Gali and Monacelli 2008

PostPosted: Wed Jan 13, 2016 4:07 pm
by xyz
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

Re: Gali and Monacelli 2008

PostPosted: Sat Feb 20, 2016 9:22 am
by jpfeifer
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.

Re: Gali and Monacelli 2008

PostPosted: Fri Mar 04, 2016 11:23 am
by webinformation
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...

آگهی رایگان
طراحی سایت
دستگاه تصفیه آب
هاست

Re: Gali and Monacelli 2008

PostPosted: Fri Mar 04, 2016 2:37 pm
by jpfeifer
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.

Re: Gali and Monacelli 2008

PostPosted: Thu Apr 14, 2016 10:30 am
by xyz
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

Re: Gali and Monacelli 2008

PostPosted: Fri Aug 19, 2016 3:38 pm
by Palumenis
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?

Re: Gali and Monacelli 2008

PostPosted: Fri Aug 19, 2016 4:30 pm
by jpfeifer
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).

Re: Gali and Monacelli 2008

PostPosted: Mon Aug 22, 2016 9:55 am
by Palumenis
Ah thanks, that solved the puzzle!