stationary and linear model in dynare 4.2

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

stationary and linear model in dynare 4.2

Postby nazanin » Tue Mar 01, 2011 11:53 am

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_y*Yh+ynh_y*Ynh;
Ynh = c_ynh*c+i_ynh*i+g_ynh*g;
Yh = (1/delta1)*h-((1-delta1)/delta1)*h(-1);
d = lnh_d*lnh+lh_d*lh;
k = delta*i+(1-delta)*k(-1);
ns = ndh_ns*ndh+ndnh_ns*ndnh;
c = c(+1)-rd+pic(+1);
q1h = z*j-z*h+c+(1+delta1)*q1h(+1)-(1+delta1)*c(+1);
p = kappa*pc_p*pc+(1-kappa)*ph_p*ph;
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 = rhob*b(-1)+epsilonvariant;
ndnh = Ynh-alfa*gr+(1-alfa)*pk-(1-alfa)*W-x1*rlnh;
Rlh = rlh_Rlh*rlh;
k = Ynh-alfa*gr-alfa*pk+alfa*W+x2*rlnh;
m = -x3*rd+c+qc;
w = c+qc+eta*ns;
ndh = Yh-ah;
pic = (((1-phi*beta)*(1-phi))/phi)*mcnh+beta*pic(+1);
pih = (((1-gamma*beta)*(1-gamma))/gamma)*mch+beta*pih(+1);
mcnh = alfa*w+(1-alfa)*pk-alfa*gr+x2*rlnh;
mch = W-ah+v2*rlh;
g = t_g*t+po_g*po+m_g*(m-m(-1)+pi);
t = sigma*Y_t*Y;
po = rhoO*po(-1)+deltaO;
phivariant = m-m(-1)+pi;
phivariant = landa1*phivariant(-1)+landa2*deltaO+epsilon;
lnh = W+ndnh;
lh = W+ndh;
ah = rhoA1*ah(-1)+epsilon1A;
j = rhoJ*j(-1)+zeta*deltaO+upsilon;
rlnh = rhoLnh*rlnh(-1)+epsilonLnh;
rlh = rhoLh*rlh(-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
Attachments
mymodelcode33.mod
(2.7 KiB) Downloaded 170 times
nazanin
 
Posts: 8
Joined: Sun Feb 27, 2011 10:32 am

Re: stationary and linear model in dynare 4.2

Postby StephaneAdjemian » Wed Mar 02, 2011 8:21 am

Dynare does not remove trends in linear models but in the original non linear model (before linearization). We should add an error message when a user attempt to do what you are trying here.
Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests