# Unit root and the order of oo_.dr.eigval

From oo_.dr.eigval, it seems that there is a unit root in my model. However, Dynare still gives me theoretical moments. I am wondering whether it’s fine as long as theoretical moments can be generated. If it is problematic, I’d like to know how I can find out which enogenouse variable is non-stationary from the order of oo_.dr.eigval. What does the order of oo_.dr.eigval correspond to?

I insert my code as follows. I’ll really appreciate it if you can provide me any clue. Thank you.
Anita

[code]var a y c ca cn cstar h ha hn gs qs s g wr rf r rstar rr rrf pih pistar brhat drhat ndrhat tr tra tbhat;
varexo nua nug nucstar nupistar nurstar;

parameters N Y WR TBhat lambda alpha eta alphastar varphi rho beta chi phi epsilon theta psigg psigd psitg psitd byhat dyhat cy gy cstary tr_y rfs rs rstars rhoa rhocstar rhopistar rhorstar;
lambda=1/3;
alpha=0.2;
eta=2/3;
alphastar=0.2;
varphi=1;
rho=1;
beta=0.98;
chi=0;
phi=1.5;
epsilon=21;
theta=75;
psigg=0.9;
psigd=-0.02;
psitg=0.5;
psitd=0.02;
rfs=1/beta;
rs=1/beta;
rstars=1/beta;
N=1;
Y=1;
WR=(epsilon-1)/epsilon;
byhat=1;
dyhat=1;
cy=WR^(1/rho);
gy=1-lambda*WR-(1-lambda)cy;
TBhat=1;
cstary=(alpha
cy)/alphastar;
tr_y=gy;
rhoa=0.85;
rhocstar=0.8;
rhopistar=0.75;
rhorstar=0.9;

model(linear);
y = a+h;
y = ((1-alpha)cy(c+etags))+(gyg)+(alphastarcstary(eta*(qs+gs)+cstar));
wr = varphiha+rhoca;
wr = varphihn+rhocn;
r = pih(+1)+rho*(ca(+1)-ca)-(gs-gs(+1));
rfsrf = (rfs+chi(1-lambda)(dyhat-1/Y))(rho*(ca(+1)-ca)-qs(+1)+qs+pistar(+1))-chi*(1-lambda)(dyhat(drhat-y)+y/Y);
rfsrf = rstarsrstar+chi*(byhat*(brhat-y)+(1-lambda)dyhat(drhat-y)+(2-lambda)y/Y);
r = phi
pih/rs;
pih = betapih(+1)+(epsilon-1)N(wr+gs-a)/theta;
tr_y
tr+byhatbrhat = gy(g-gs)+rfsbyhatbrhat(-1);
TBhattbhat = y-cy(c+gs)-gyg;
g = psigg
g(-1)+psigdrfsbyhatbrhat(-1)/gy+nug;
tr_y
tr = gypsitg(g-gs)+psitdbyhatrfsbrhat(-1);
cy
ca+dyhat*(rfsdrhat(-1)-drhat)+(dyhat-(1/Y))rfs(rf(-1)+qs-qs(-1)-pistar) = (y-gs-lambdaWR*(wr+hn)-tr_ytra)/(1-lambda);
cy
cn = WR*(wr+hn);
c = (1-lambda)ca+lambdacn;
h = (1-lambda)ha+lambdahn;
tr = tra;
a = rhoaa(-1)+nua;
cstar = rhocstar
cstar(-1)+nucstar;
pistar = rhopistarpistar(-1)+nupistar;
rstar = rhorstar
rstar(-1)+nurstar;
rr = r+(gs-gs(+1)-pih(+1));
rrf = rf+(qs(+1)-qs-pistar(+1));
gs = alpha*s;
qs = (1-alphastar)*s-gs;
ndrhat = brhat+(1-lambda)*drhat;
end;

resid(1);
check;

shocks;
var nua;
stderr 0.007;
var nug;
stderr 0.008;
var nucstar;
stderr 0.007;
var nupistar;
stderr 0.007;
var nurstar;
stderr 0.008;
end;

stoch_simul(irf=40,periods=2100);[/code]

Having unit roots is not necessarily a problem, it depends on what you want to do. For estimation it is preferable to detrend the model, unless you have cointegration relationships (these can be exploited only when estimating in levels).

For the order of eigeinvalues, see my answer there: Ramsey Policy - no theoretical moments

Best,