Hi
I am a problem with dynare version 4.2
I know that must first stationarize my model, then linearize it
I linearize my model by hand and like that dynare automatically Remove it’s trends in all the equations
so i intern Endogenous variables in dynare version 4.2 :
var phivariant b;
trend_var(growth_factor=1+b) gr;
trend_var(growth_factor=phivariant) M;
var(deflator=gr) Y Yh Ynh i g c h k mch mcnh t;
var(deflator=M) lnh lh d W;
var(deflator=M/gr) ph pc p pk;
var rd Rlh rlh j ns ndh ndnh w ah m po pi pih pic
q1k q1h qc rlnh;
and intern my model to linear in dynare version 4.2 :
model (linear);
Y = yh_yYh+ynh_yYnh;
Ynh = c_ynhc+i_ynhi+g_ynhg;
Yh = (1/delta1)h-((1-delta1)/delta1)h(-1);
d = lnh_dlnh+lh_dlh;
k = deltai+(1-delta)k(-1);
ns = ndh_nsndh+ndnh_nsndnh;
c = c(+1)-rd+pic(+1);
q1h = zj-zh+c+(1+delta1)q1h(+1)-(1+delta1)c(+1);
p = kappapc_ppc+(1-kappa)ph_pph;
q1h = ph-pc;
ph = pih+ph(-1);
pc = pic+pc(-1);
qc = pc-p;
p = pi+p(-1);
q1k = q1k(+1)+c-c(+1);
q1k = pk-pc;
w = W-p;
b = rhobb(-1)+epsilonvariant;
ndnh = Ynh-alfagr+(1-alfa)pk-(1-alfa)W-x1rlnh;
Rlh = rlh_Rlhrlh;
k = Ynh-alfagr-alfapk+alfaW+x2rlnh;
m = -x3rd+c+qc;
w = c+qc+etans;
ndh = Yh-ah;
pic = (((1-phibeta)(1-phi))/phi)mcnh+betapic(+1);
pih = (((1-gammabeta)(1-gamma))/gamma)mch+betapih(+1);
mcnh = alfaw+(1-alfa)pk-alfagr+x2rlnh;
mch = W-ah+v2rlh;
g = t_gt+po_gpo+m_g*(m-m(-1)+pi);
t = sigmaY_tY;
po = rhoOpo(-1)+deltaO;
phivariant = m-m(-1)+pi;
phivariant = landa1phivariant(-1)+landa2deltaO+epsilon;
lnh = W+ndnh;
lh = W+ndh;
ah = rhoA1ah(-1)+epsilon1A;
j = rhoJj(-1)+zetadeltaO+upsilon;
rlnh = rhoLnhrlnh(-1)+epsilonLnh;
rlh = rhoLhrlh(-1)+epsilonLh;
end;
i think in this model , dynare detrend linear model and not main model and we know before linearize must stationarize model
is it true?
so probably we can’t use dynare version 4.2 , for automatically Removing trend in the linear model???
however i run model in this shape and got error as follows:
Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
Starting Dynare (version 4.2.0).
Starting preprocessing of the model file …
Found 39 equation(s).
Evaluating expressions…done
ERROR: the second-order cross partial of equation 19 w.r.t. trend variable gr and endogenous variable W is not null.
??? Error using ==> dynare at 126
DYNARE: preprocessing failed
I attach complete code
please guide me and tell me can i use dynare version 4.2 for automatically Removing trend and also intern model linearize?
Thanks
mymodelcode33.mod (2.7 KB)