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)

zm-sigmm=lamd+nr/(1+nrss);

q=pai(+1)-(nr/(1+nrss))+(((1-delta)

*q(+1)+rkss*rk(+1))/(1-delta+rkss));zm-sigm

zi=roui

*zi(-1)+ei;*

zc=rouczc(-1)+ec;

zc=rouc

zm=roum

*zm(-1)+em;*

zl=roulzl(-1)+el;

zl=roul

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)*w+(1-a-b)

*pcer-ad+yd;*

pcer+co2=ar+bpcer+co2=a

*pcer-ad+yd;*

rk+kc(-1)=ccrk+(1-cc)

rk+kc(-1)=cc

*w-ac+yc;*

w+lc=ccr+(1-cc)

w+lc=cc

*w-ac+yc;*

yc=ac+cclc+(1-cc)

yc=ac+cc

*kc(-1);*

yd=ad+ald+b

yd=ad+a

*kd(-1)+(1-a-b)*(ydss^((lamdf-1)/lamdf))

*co2;*

yssy=(gama^(1/lamdf))yss

*yd+((1-gama)^(1/lamdf))*(ydss^((lamdf-1)/lamdf))

*yc;*

ad=rouadad(-1)+ead;

ad=rouad

ac=rouac

*ac(-1)+eac;*

psd=(1-ebipbeta)

psd=(1-ebip

*(a*rk+b

*w+(1-a-b)*((pss^(1-lamdf))

*pcer-ad)+ebip*beta*(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-ebipbeta)

psc=(1-ebip

*(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)*

y=issi/yss+css

*kc;*

l=lamdlld+(1-lamdl)l=lamdl

*lc;*

r(+1)=phimr+(1-phim)r(+1)=phim

*phiy*y(+1)+er;y=iss

*c/yss+gss*g/yss;

r=nr-pai(+1);

rk=r+delta;

k=(1-delta)

*k(-1)+delta*(i+zi);

obsy=y

*zy;*

zy=rouyzy(-1)+ey;

zy=rouy

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