The steady state with NaN or Inf

Hi,
I am quite new to Dynare and as a project work i had the problem of solving a new Keynesian model but when i run my model i get the problem :
Error using print_info (line 90)
The steady state contains NaN or Inf

my model is the following

%endogenous variables
var y a w pinf winf a z v c i n;

%exogenous variables
varexo ev ea ez;

%parameters
parameters sigma phi phi_p phi_w phi_y theta_p rho_v rho_z rho_a beta 
alpha epsilon_p epsilon_w theta_w rho_i sigma_ev sigma_ea sigma _ez;
% Calibration
sigma=1;
phi=5; 
phi_p=1.5; 
phi_w=2; 
phi_y=0.125; 
theta_p=0.75; 
rho_v=0.5; 
rho_z=0.5; 
rho_a=0.9; 
beta=0.99; 
alpha=0.25;
epsilon_p=9;
epslon_w=4.5;
theta_w=0.75;
rho_i=0.8;
sigma_ev=0.02;
sigma_ea=0.01;
sigma_ez=0.01;



model;
#lambda_p=(((1-theta_p)* (1-theta_p*beta))/theta_p) * ((1-alpha)
/(1-alpha-alpha*epsilon_p));
# Nu_p=(alpha * lambda_p)/(1-alpha);
#phi_ya=((1+phi)/((sigma*(1-alpha))+phi+alpha));
#y_n= phi_ya*a;
#y_hat=y-y_n;

#phi_wa=((1-alpha*phi_ya)/(1-alpha));
#w_n=phi_wa*a;
# w_hat= w-w_n;
#lambda_w=((1-theta_w)*(1-beta*theta_w)/(theta_w*(1+phi*epsilon_w)));

#Nu_w=lambda_w *((sigma+(phi/(1-alpha))));

#r= (-sigma)*(1-rho_a)*phi_ya * a + (1-rho_z)*z;

%shock process
v=rho_v*(v(-1))+ev;
a=rho_a*(a(-1))+ea;
z=rho_z*(z(-1))+ez;

%keynesian phillips curve
pinf=(beta*pinf(+1))+(Nu_p *y_hat)+(lambda_p*w_hat);


%wage gap and price inflation relation
w_hat= (w(-1)-phi_wa *a(-1))+winf-pinf-(w_n-phi_wa *a(-1));


%New keynesian wage phillips curve

winf = beta *winf(+1)+ Nu_w * y_hat - lambda_w *w_hat;

%Dynamic IS curve

y_hat=-1/sigma *(i-pinf(+1)-r)
+(y(+1)-(1+phi)/(sigma*(1-alpha)+phi+alpha)*a(+1));

%production function
y=a+(1-alpha)*n;

%resource constraint

y=c;

%monetary policy rule

i=(1-rho_i) *i(-1)+rho_i*(phi_p*pinf +phi_w*winf+phi_y*y_hat)+v;

end;
%steady state
initval;
y=log(3);
i=log(1.5);
pinf=2.5;
winf=3;
c=log(2.5);
w=0;
v=0;
z=0;

end;

shocks;
var ev=sigma_ev^2;
var ea= sigma_ea^2;
var ez =sigma_ez^2;
end;

steady;
check;
stoch_simul(hp_filter=1600,irf=40)y c pinf winf i;

You never set epsilon_w to any value.
Also, you seem to have a linearized model. Why are your steady state values not 0?

I am sorry i didn’t get it. Does it mean i should not set value to epsilon_w? I have it zeros now, i don’t know what i was thinking that time.

Dear professor,
Thank you for your reply. I am still facing problem. I have edited some of the codes. Now, i get :
Residuals of the static equations as zeros but not in equation 10 (shows NaN), it again gives the message : STEADY: numerical initial values or parameters incompatible with the following equations 10 and again gives the residual of 10 and 13 as NaN. Can you please see my codes

%endogenous variables
var y a w pinf winf z v c int n y_n w_n r y_hat w_hat;

%exogenous variables
varexo ev ea ez ;

%parameters
parameters sigma phi phi_p phi_w phi_y theta_p rho_v rho_z rho_a beta 
alpha epsilon_p epsilon_w theta_w rho_i ;
% Calibration
sigma=1;
phi=5; 
phi_p=1.5; 
phi_w=2; 
phi_y=0.125; 
theta_p=0.75; 
rho_v=0.5; 
rho_z=0.5; 
rho_a=0.9; 
beta=0.99; 
alpha=0.25;
epsilon_p=9;
epsilon_w=4.5;
theta_w=0.75;
rho_i=0.8;
sigma_ev=0.02;
sigma_ea=0.01;
sigma_ez=0.01;



model (linear);
#lambda_p=(((1-theta_p)* (1-beta*theta_p))/theta_p) * ((1-alpha)
/(1-alpha-alpha*epsilon_p));
#Nu_p=(alpha * lambda_p)/(1-alpha);
#phi_ya=((1+phi)/((sigma*(1-alpha))+phi+alpha));

#phi_wa=((1-alpha*phi_ya)/(1-alpha));

#lambda_w=((1-theta_w)*(1-beta*theta_w)/(theta_w*(1+phi*epsilon_w)));

#Nu_w=lambda_w *(sigma+(phi/(1-alpha)));



%shock process
%1 Monetary policy shock
v=rho_v*(v(-1))+ev;

%2 Total factor productivity shock
a=rho_a*(a(-1))+ea;

%3 Preference Shock
z=rho_z*(z(-1))+ez;

% 4  Natural Level of Output
y_n= phi_ya*a;


% 5 Output Gap
y_hat=y-y_n;

%%%%%

%6 keynesian phillips curve
pinf=(beta*pinf(+1))+(Nu_p *y_hat)+(lambda_p*w_hat);

% 7 Natural Level of wages
w_n=phi_wa*a;

% 8 wage Gap
w_hat= w-w_n;


%9 wage gap and price inflation relation
w_hat= (w_hat(-1))+winf-pinf-(w_n-w_n(-1));


%10 New keynesian wage phillips curve
winf = (beta *winf(+1))+ (Nu_w * y_hat) - (lambda_w *w_hat);

%11 Dynamic IS curve
y_hat=-1/sigma *(int-pinf(+1)-r)
+(y(+1)-(1+phi)/(sigma*(1-alpha)+phi+alpha)*a(+1));

%%% 12 natural level of real interest rate at flexible price system
r= (-sigma)*(1-rho_a)*phi_ya * a + (1-rho_z)*z;
%%%%


%13 production function
y=a+(1-alpha)*n;

%14 resource constraint
y=c;

%15 monetary policy rule
int=(1-rho_i) *int(-1)+rho_i*(phi_p*pinf +phi_w*winf+phi_y*y_hat)+v;

end;
%steady state
initval;
y=0;
int=0;
pinf=0;
winf=0;
c=0;
a=0;
w=0;
v=0;
z=0;
n=0;
y_n=0;
w_n=0 ;
r=0; 
y_hat=0;
w_hat=0;

end;

shocks;
var ev=sigma_ev^2;
var ea= sigma_ea^2;
var ez =sigma_ez^2;
end;
resid(1);
steady;
check;
stoch_simul(hp_filter=1600,irf=40)y c pinf winf int;

When I run your code, the steady state solves, but there is a problem with the Blanchard/Kahn conditions. That is most probably a timing mistake or some error like a wrong sign somewhere.

The questions given to me had a typo. Thank you professor. It helped me a lot.