Dynare running despite large SS residuals
Posted: Fri Jun 09, 2017 3:12 pm
Hi There,
I was a little bit surprised by the fact that dynare was running (and not giving any warnings) even though the steady_state_model; generated non-zero residuals (of the order of magnitude of 5...). The resid command caused the code to stop; but I didn't have it there initially, so was oblivious to the underlying issues...
This may be standard functionality, or it may not - in which case I thought I'd bring it to your attention.
So here's the scenario (not sure if any of this is relevant, so listing everything I think may be):
1. All parameter values and some steady state values (which are included as parameters) are in an external .mat file called SS_VALS; (generated outside of dynare).
2. They are loaded using the load SS_VALS; command and then parameters are assigned values using a sequence of set_param_value('alph' ,alph) commands.
3. The model; block and the steady_state_model; blocks are pretty standard except that some steady state values of variables are set equal to the parameters (loaded in 2.)
4. I was running the model using the stoch_simul(periods = 223800, order = 1, irf=0, nograph, noprint) GDP LOG_PI DEF SPR; and was getting simulation results without the code squeaking out a warning...
5. When I added the resid; command before stoch_simul I got a steadystate file did not compute the steady state error, which I would have thought I should have been getting all along... Same thing happens when I tweak the stoch_simul command to stoch_simul(order = 1, irf=0, nograph) GDP LOG_PI DEF SPR; - i.e. this DOES throw the SS error... So I guess it looks like it's something to do with the periods option being invoked, perhaps?
Thoughts welcome - happy to send over the code, but would rather not post it on the forum as it's partially someone else's intellectual property, and I was asked not to distribute it more widely (shouldn't be too difficult to replicate, though?).
Thanks in advance for looking into this (and now I need to fix the SS file, I think...).
Pawel
I was a little bit surprised by the fact that dynare was running (and not giving any warnings) even though the steady_state_model; generated non-zero residuals (of the order of magnitude of 5...). The resid command caused the code to stop; but I didn't have it there initially, so was oblivious to the underlying issues...
This may be standard functionality, or it may not - in which case I thought I'd bring it to your attention.
So here's the scenario (not sure if any of this is relevant, so listing everything I think may be):
1. All parameter values and some steady state values (which are included as parameters) are in an external .mat file called SS_VALS; (generated outside of dynare).
2. They are loaded using the load SS_VALS; command and then parameters are assigned values using a sequence of set_param_value('alph' ,alph) commands.
3. The model; block and the steady_state_model; blocks are pretty standard except that some steady state values of variables are set equal to the parameters (loaded in 2.)
4. I was running the model using the stoch_simul(periods = 223800, order = 1, irf=0, nograph, noprint) GDP LOG_PI DEF SPR; and was getting simulation results without the code squeaking out a warning...
5. When I added the resid; command before stoch_simul I got a steadystate file did not compute the steady state error, which I would have thought I should have been getting all along... Same thing happens when I tweak the stoch_simul command to stoch_simul(order = 1, irf=0, nograph) GDP LOG_PI DEF SPR; - i.e. this DOES throw the SS error... So I guess it looks like it's something to do with the periods option being invoked, perhaps?
Thoughts welcome - happy to send over the code, but would rather not post it on the forum as it's partially someone else's intellectual property, and I was asked not to distribute it more widely (shouldn't be too difficult to replicate, though?).
Thanks in advance for looking into this (and now I need to fix the SS file, I think...).
Pawel