Plz, help for my code!Thank you

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.

Plz, help for my code!Thank you

Postby Iceicecool » Sat Jul 30, 2016 7:33 pm

Here is my code. And it keep run failed because of steady .
var s k c Ec u ;

varexo epsilon;

parameters r sigma y ;



sigma=2.4;
r=1.2;
y=2;


model(linear);
Ec = c(+1);
c=Ec-r+ u;
k=(1-sigma)*k(-1)+s;
s=k+y-c;
u=epsilon;

end;


shocks;
var epsilon;
stderr 1;
end;

steady;
stoch_simul;

Here is the wrong information
Residuals of the static equations:

Equation number 1 : NaN
Equation number 2 : NaN
Equation number 3 : NaN
Equation number 4 : NaN
Equation number 5 : 0


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 project3 (line 104)
steady;
Error in dynare (line 180)
evalin('base',fname) ;
Iceicecool
 
Posts: 2
Joined: Thu Jul 14, 2016 11:44 pm

Re: Plz, help for my code!Thank you

Postby jpfeifer » Mon Aug 01, 2016 7:39 am

Your model does not have a steady state.
Code: Select all
Ec = c(+1);
c=Ec-r+ u;

The first equation says that c=Ec. Using this in the second says that
Code: Select all
0=-r

because u=0 by it being an exogenous shock. But as r>0, this cannot be.
------------
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


Return to Dynare User Guide

Who is online

Users browsing this forum: No registered users and 1 guest