[help!!]How to delete an equation?
Posted: Fri Sep 27, 2013 9:32 am
Hello everybody,I'm a beginner to use dynare and make dsge model.
I've just made a model like follows:
var zco zy obsy c zc lamd zl l w co2 q zi rk nr p m zm r i ld kd yd pcer ad lc kc ac k yc y pai psd psc g M;
varexo ey ec el ei eco em ead eac eM eg er;
parameters rouy nrss rss rkss ycss ydss wss lamdss kss ldss iss yss css gss pss psdss pscss sigc sigl sigco delta sigm roui rouc roul rouco roum a b cc ebip beta lamdf lamdk lamdl gama rouad rouac rouM roug phim phiy;
model ;
zc-sigc*c=lamd;
zl-sigl*l=lamd+w;
q=-zi;
zco-sigco*co2=lamd+pcer;
q=pai(+1)-(nr/(1+nrss))+(((1-delta)*q(+1)+rkss*rk(+1))/(1-delta+rkss));
zm-sigm*m=lamd+nr/(1+nrss);
zi=roui*zi(-1)+ei;
zc=rouc*zc(-1)+ec;
zm=roum*zm(-1)+em;
zl=roul*zl(-1)+el;
zco=rouco*zco(-1)+eco;
rk+kd(-1)=a*rk+b*w+(1-a-b)*pcer-ad+yd;
w+ld=a*r+b*w+(1-a-b)*pcer-ad+yd;
pcer+co2=a*r+b*w+(1-a-b)*pcer-ad+yd;
rk+kc(-1)=cc*rk+(1-cc)*w-ac+yc;
w+lc=cc*r+(1-cc)*w-ac+yc;
yc=ac+cc*lc+(1-cc)*kc(-1);
yd=ad+a*ld+b*kd(-1)+(1-a-b)*co2;
yss*y=(gama^(1/lamdf))*(ydss^((lamdf-1)/lamdf))*yd+((1-gama)^(1/lamdf))*(ydss^((lamdf-1)/lamdf))*yc;
ad=rouad*ad(-1)+ead;
ac=rouac*ac(-1)+eac;
psd=(1-ebip*beta)*(a*rk+b*w+(1-a-b)*pcer-ad)+ebip*beta*((pss^(1-lamdf))*(pai(+1)+p)+(1-gama)*(pscss^(1-lamdf))*(yc(+1)+yd(+1))/lamdf)/(gama*(psdss^(1-lamdf))+(1-gama)*(pscss^(1-lamdf)))+pai;
psc=(1-ebip*beta)*(cc*rk+(1-cc)*w-ac)+ebip*beta*((pss^(1-lamdf))*(pai(+1)+p)+(1-gama)*(pscss^(1-lamdf))*(yc(+1)+yd(+1))/lamdf)/(gama*(psdss^(1-lamdf))+(1-gama)*(pscss^(1-lamdf)))-(1/lamdf)*(yc(+1)+yd(+1))+pai;
(pss^(1-lamdf))*p=gama*(psdss^(1-lamdf))*psd+(1-gama)*(pscss^(1-lamdf))*psc;
M=rouM*M(-1)+eM;
g=roug*g(-1)+eg;
m=M-p;
k=lamdk*kd+(1-lamdk)*kc;
l=lamdl*ld+(1-lamdl)*lc;
r(+1)=phim*r+(1-phim)*phiy*y(+1)+er;
y=iss*i/yss+css*c/yss+gss*g/yss;
r=nr-pai(+1);
rk=r+delta;
k=(1-delta)*k(-1)+delta*(i+zi);
obsy=y*zy;
zy=rouy*zy(-1)+ey;
end;
But the number of the endogenous variables is more than equations.Which equation should I delete? I think every equation is necessary.What should I do?
Thank you for your reading and answering!
Best regards,
Wu
I've just made a model like follows:
var zco zy obsy c zc lamd zl l w co2 q zi rk nr p m zm r i ld kd yd pcer ad lc kc ac k yc y pai psd psc g M;
varexo ey ec el ei eco em ead eac eM eg er;
parameters rouy nrss rss rkss ycss ydss wss lamdss kss ldss iss yss css gss pss psdss pscss sigc sigl sigco delta sigm roui rouc roul rouco roum a b cc ebip beta lamdf lamdk lamdl gama rouad rouac rouM roug phim phiy;
model ;
zc-sigc*c=lamd;
zl-sigl*l=lamd+w;
q=-zi;
zco-sigco*co2=lamd+pcer;
q=pai(+1)-(nr/(1+nrss))+(((1-delta)*q(+1)+rkss*rk(+1))/(1-delta+rkss));
zm-sigm*m=lamd+nr/(1+nrss);
zi=roui*zi(-1)+ei;
zc=rouc*zc(-1)+ec;
zm=roum*zm(-1)+em;
zl=roul*zl(-1)+el;
zco=rouco*zco(-1)+eco;
rk+kd(-1)=a*rk+b*w+(1-a-b)*pcer-ad+yd;
w+ld=a*r+b*w+(1-a-b)*pcer-ad+yd;
pcer+co2=a*r+b*w+(1-a-b)*pcer-ad+yd;
rk+kc(-1)=cc*rk+(1-cc)*w-ac+yc;
w+lc=cc*r+(1-cc)*w-ac+yc;
yc=ac+cc*lc+(1-cc)*kc(-1);
yd=ad+a*ld+b*kd(-1)+(1-a-b)*co2;
yss*y=(gama^(1/lamdf))*(ydss^((lamdf-1)/lamdf))*yd+((1-gama)^(1/lamdf))*(ydss^((lamdf-1)/lamdf))*yc;
ad=rouad*ad(-1)+ead;
ac=rouac*ac(-1)+eac;
psd=(1-ebip*beta)*(a*rk+b*w+(1-a-b)*pcer-ad)+ebip*beta*((pss^(1-lamdf))*(pai(+1)+p)+(1-gama)*(pscss^(1-lamdf))*(yc(+1)+yd(+1))/lamdf)/(gama*(psdss^(1-lamdf))+(1-gama)*(pscss^(1-lamdf)))+pai;
psc=(1-ebip*beta)*(cc*rk+(1-cc)*w-ac)+ebip*beta*((pss^(1-lamdf))*(pai(+1)+p)+(1-gama)*(pscss^(1-lamdf))*(yc(+1)+yd(+1))/lamdf)/(gama*(psdss^(1-lamdf))+(1-gama)*(pscss^(1-lamdf)))-(1/lamdf)*(yc(+1)+yd(+1))+pai;
(pss^(1-lamdf))*p=gama*(psdss^(1-lamdf))*psd+(1-gama)*(pscss^(1-lamdf))*psc;
M=rouM*M(-1)+eM;
g=roug*g(-1)+eg;
m=M-p;
k=lamdk*kd+(1-lamdk)*kc;
l=lamdl*ld+(1-lamdl)*lc;
r(+1)=phim*r+(1-phim)*phiy*y(+1)+er;
y=iss*i/yss+css*c/yss+gss*g/yss;
r=nr-pai(+1);
rk=r+delta;
k=(1-delta)*k(-1)+delta*(i+zi);
obsy=y*zy;
zy=rouy*zy(-1)+ey;
end;
But the number of the endogenous variables is more than equations.Which equation should I delete? I think every equation is necessary.What should I do?
Thank you for your reading and answering!
Best regards,
Wu