[help!!]How to delete an equation?

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.

[help!!]How to delete an equation?

Postby wxyzf6223321 » 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
wxyzf6223321
 
Posts: 11
Joined: Fri Sep 27, 2013 9:22 am

Re: [help!!]How to delete an equation?

Postby jpfeifer » Fri Sep 27, 2013 11:46 am

From what you are saying, you are actually missing an equation that determines the last variable!
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: [help!!]How to delete an equation?

Postby wxyzf6223321 » Fri Sep 27, 2013 11:56 am

jpfeifer wrote:From what you are saying, you are actually missing an equation that determines the last variable!

I'm sorry for my poor English,and which variable am I missing? Thank you.
wxyzf6223321
 
Posts: 11
Joined: Fri Sep 27, 2013 9:22 am

Re: [help!!]How to delete an equation?

Postby jpfeifer » Fri Sep 27, 2013 12:31 pm

You will never get an answer here. You are the model builder and the only one knowing how you derived the equations you entered into Dynare. This is not a Dynare problem. If you cannot tell from your model which equation is too much, nobody else can.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: [help!!]How to delete an equation?

Postby wxyzf6223321 » Fri Sep 27, 2013 1:17 pm

jpfeifer wrote:You will never get an answer here. You are the model builder and the only one knowing how you derived the equations you entered into Dynare. This is not a Dynare problem. If you cannot tell from your model which equation is too much, nobody else can.

Thanks very much!! I have solved the problem. But here comes another one.

Error using print_info (line 52)
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-6)

Error in check (line 76)
print_info(info, options.noprint);

Error in test2 (line 397)
oo_.dr.eigval = check(M_,options_,oo_);

Error in dynare (line 120)
evalin('base',fname) ;

This problem is made by the parameters or something else?
Attachments
test2.mod
(3.35 KiB) Downloaded 63 times
wxyzf6223321
 
Posts: 11
Joined: Fri Sep 27, 2013 9:22 am

Re: [help!!]How to delete an equation?

Postby jpfeifer » Fri Sep 27, 2013 3:11 pm

Use model_diagnostics(M_,options_,oo_) to see that you added a redundant equation and that you did not solve the issue.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: [help!!]How to delete an equation?

Postby wxyzf6223321 » Fri Sep 27, 2013 4:36 pm

jpfeifer wrote:Use model_diagnostics(M_,options_,oo_) to see that you added a redundant equation and that you did not solve the issue.

Amazing!It's useful to me. The model has colinear equations.
Thanks a lot.
wxyzf6223321
 
Posts: 11
Joined: Fri Sep 27, 2013 9:22 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests