Page 1 of 1

Steady State File Residuals

PostPosted: Wed Aug 12, 2015 11:00 pm
by Gradstudent
Hi everyone,

I'm relatively new to Dynare and any help/insight you can provide will be much appreciated. I'm working on a DSGE model with 30 equations and have an auxiliary steady state file. I'm confused on why my steady state file evaluates residuals for 6 of my 30 equations to non-zero values. When I evaluate these equations at Matlab's command prompt, given my analytically computed steady state values, three of these six equations evaluate to zero. I don't understand why I'm seeing this discrepancy.

Also, when I evaluate all my analytically computed steady state values at Matlab's command prompt, I get a negative value for consumption.

Any suggestions/insights will be much appreciated.

Thank you!

Re: Steady State File Residuals

PostPosted: Thu Aug 13, 2015 8:37 am
by Fabian
Without the files tracking the error is almost impossible. Maybe you changed the order of your equations? If the steady state file computes say
B = 2
A = B+C
C = 5
you'd get A=2 which results in a residual not equal to 0. At least this happened to me a lot of times.

Re: Steady State File Residuals

PostPosted: Thu Aug 13, 2015 1:29 pm
by jpfeifer
When your analytical steady state returns negative consumption, your computations must still be wrong.

Re: Steady State File Residuals

PostPosted: Mon Aug 17, 2015 9:32 pm
by Gradstudent
Thank you both Fabian and jpfeifer for helping me. I double-checked the order of the equations that I am using in the steady state file by evaluating them at Matlab's command prompt. I'm able to find values for all my variables. I found a mistake in my government expenditure equation and now, my consumption is positive. However, government expenditure is now negative. Is this as serious a problem as the negative consumption is? Does this mean that I have made a mistake when computing the steady states analytically? Or does it mean that some of my calibrated parameter values are off?

Thanks in advance for your help! :)

Re: Steady State File Residuals

PostPosted: Tue Aug 18, 2015 7:32 am
by Fabian
I can't tell you if the negative expenditure is an economic problem, but you can easily check if your steady states are right by copying your model equations (in the form 0 = a+b+c) to another file, removing the lags (-1) and leads (+1) and evaluating the righthandside with the steady states. You should get only zeros and if not, your steady states do not fit the model equations. In that case you need to carefully rethink your equations and recalculate your steady states.

Re: Steady State File Residuals

PostPosted: Tue Aug 18, 2015 11:10 am
by jpfeifer
We are talking about real goods here, so negative values make no sense at all. What does it mean that the government consumes minus one apple?

Is your model in logs? If yes, then this can happen as the log of something positive but smaller than 1 will be negative.

Regardless, if your steady state does not solve the entered model equations, one of the two is still wrong.

Re: Steady State File Residuals

PostPosted: Tue Aug 18, 2015 4:38 pm
by Gradstudent
Thanks everyone for your help. I've fixed my problem. One of my parameter values from my steady state file did not match the same parameter value in the .mod file. I've fixed this and now, the model runs :)

Re: Steady State File Residuals

PostPosted: Tue Aug 18, 2015 4:43 pm
by Gradstudent
Hi jpfeifer, I missed your last post. But, nope my model is not in log terms, it's nonlinear. So, I guess as you correctly pointed out, even if the model is running, a negative government expenditure does not make much sense. Government expenditure is a very small negative number (-0.000342) but it's still negative. This is a new model that I'm writing and it involves government bonds - so may be I have to go back to the actual model and see if something is off there. Thank you very much for your responses.