Steady State File Residuals

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.

Steady State File Residuals

Postby Gradstudent » Wed Aug 12, 2015 11:00 pm

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!
Gradstudent
 
Posts: 4
Joined: Wed Aug 12, 2015 10:50 pm

Re: Steady State File Residuals

Postby Fabian » Thu Aug 13, 2015 8:37 am

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.
Fabian
 
Posts: 11
Joined: Fri May 15, 2015 11:56 am

Re: Steady State File Residuals

Postby jpfeifer » Thu Aug 13, 2015 1:29 pm

When your analytical steady state returns negative consumption, your computations must still be wrong.
------------
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: Steady State File Residuals

Postby Gradstudent » Mon Aug 17, 2015 9:32 pm

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! :)
Gradstudent
 
Posts: 4
Joined: Wed Aug 12, 2015 10:50 pm

Re: Steady State File Residuals

Postby Fabian » Tue Aug 18, 2015 7:32 am

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.
Fabian
 
Posts: 11
Joined: Fri May 15, 2015 11:56 am

Re: Steady State File Residuals

Postby jpfeifer » Tue Aug 18, 2015 11:10 am

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.
------------
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: Steady State File Residuals

Postby Gradstudent » Tue Aug 18, 2015 4:38 pm

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 :)
Gradstudent
 
Posts: 4
Joined: Wed Aug 12, 2015 10:50 pm

Re: Steady State File Residuals

Postby Gradstudent » Tue Aug 18, 2015 4:43 pm

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.
Gradstudent
 
Posts: 4
Joined: Wed Aug 12, 2015 10:50 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests