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.

Residuals

Postby rteconomics » Tue Apr 17, 2012 12:53 pm

Hello,
One easy (?) question. I'm working on a model that has 24 equations.
With the command 'resid;' I can see the residuals from each equation. The model runs fine and the results are almost ok BUT the residuals of 1 of the 24 equations are NOT zero. After checking many times, I'm sure that equation is correctly specified.

Does anyone know why this happens and what issue can this generate?
Many thanks in advance!
RT
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Residuals

Postby bkjecn » Tue Apr 17, 2012 1:31 pm

If you have non-zero residuals using the resid command it means that the values in the most recent initval or endval block, or the values that are returned form your _steadystate.m file, do not satisfy the static equations. This means that the values for the endogenous variables don't solve the steady state. The equation may be correct, but it seems that you haven't quite solved for the steady state. It's hard to tell exactly what is wrong without seeing the mod file.
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: Residuals

Postby rteconomics » Tue Apr 17, 2012 1:42 pm

Hi bkjecn!
Attached is the .mod file. It's an open economy model built on Uribe (2003) with capital adjustment costs, portfolio adjustment costs and government expenditure reversal. I solved the model by hand and found the corresponding steady state values (and equations) by hand.
The equation that 'does not clear' is the FOC wrt h (marginal disutility of work). It's very puzzling because if N-1 equations clear, why the N-th does not?
Thanks again!
RT
Attachments
model.mod
(9.51 KiB) Downloaded 108 times
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Residuals

Postby rteconomics » Tue Apr 17, 2012 1:44 pm

Actually,
It just came to my mind that I am calibrating the steady-state value of h (I think you can't get it from the equations). Do u think that might be the issue?
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Residuals

Postby bkjecn » Tue Apr 17, 2012 2:16 pm

Yes, I think that could be the issue. h is an endogenous variable in your model. It's steady state will be determined by the model equations.
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests