Page 1 of 1

Plz, help for my code!Thank you

PostPosted: Sat Jul 30, 2016 7:33 pm
by Iceicecool
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) ;

Re: Plz, help for my code!Thank you

PostPosted: Mon Aug 01, 2016 7:39 am
by jpfeifer
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.