# UNRECOGNIZED ERROR MESSAGE

I have computed analytical steady states (pen and pencil) for a baseline RBC model, and I am trying to compute it with the command ‘steady’, but I get the following error

How can I get over it?
Thank you

Put `resid` before `steady` and check what causes the residual.

residuals are zero everywhere except in the cobb-douglas production function for aggregate output; is it misspecified? If so, I can get why. Here the mod.file for my code.
RBC_invhousehold.mod (1.3 KB)

Thanks everybody for the help, I am a beginner in dynare

``````var y c k n r w inv;
varexo z; %% white noise on exogenous stochastic process for aggregate produtivity
parameters calpha cbeta cdelta;

%%calibrated parameters
calpha = 0.33;
cbeta = 0.99;
cdelta = 0.025;

predetermined_variables k;
model;
k(+1) = (1-cdelta)*k+inv;                              %%law of motion for aggregate capital
y = exp(z)*(k^calpha)*(n^(1-calpha));                                   %%cobb-douglas crs aggregate production function
c = y - inv;                                                %%resource constraint
w= - (c/(1-n));                                                %%labor mkt equilibrium
r = calpha * y/k;
cbeta * (r(+1) + 1 - cdelta)/c(+1) = 1/c;                   %investment/saving equilibrium for capital mkt
w = (1-calpha) * y/n;                %%factor price: mg product of labor
end;

r = 1/cbeta + cdelta - 1;
K_N = (calpha / r) ^ (1/(1-calpha));
w = (1-calpha)*K_N^calpha;
Y_N  = K_N^calpha;
INV_N = cdelta * K_N;
C_N= Y_N - INV_N;
n = (w * C_N^-1) / ((w * C_N^-1)-1); %%closed form solution for steady state labor with log utitlity
k = K_N * n;
y = Y_N * n;
inv = INV_N * n;
c = C_N * n;
end;
resid;