i am trying to run a model with 30 equation, every time i run the dynare code, this error will be appeared:
There are 30 equations but 29 endogenous variables!
the dynare code and equation is:
var nod cp nos wp ip kp kpstar g cg p ig kg kgstar ih kh khstar icap kcap kcapstar xn mn tx bd m y w yp f ox;
varexo oa po e pstar ystar nosp op r em rstar;
parameters beta1 beta2 beta3 beta4 beta6 beta7 beta8 beta9 beta10 beta11 beta12 beta13 beta14 beta15 beta16 beta17 teta1 teta2 teta3
gamma delta rho sigma lambda nu mu1 mu2 epsilon1 epsilon2 epsilon3 epsilon5 epsilon6 epsilon7 tau psi1 psi2 phi1 phi2 phi3 phi4 phi5
alpha1 alpha2 alpha3 zeta;
model(linear);
//product market
nod = beta1*cp + beta2*ip + beta3*g + beta4*(xn-mn);
cp = beta6*nos + beta7*wp;
ip = gamma*(kpstar-kp);
(kp-kp(-1)) = gamma*(kpstar-kp);
kpstar = delta*nos;
g = beta8*cg + beta9*ig + beta10*ih + beta11*icap;
cg = (1-teta1-teta2-teta3)*(oa+po+e-p);
ig = rho*(kgstar-kg);
(kg-kg(-1)) = rho*(kgstar-kg);
ih = sigma*(khstar-kh);
(kh-kh(-1)) = sigma*(khstar-kh);
icap = lambda*(kcapstar-kcap);
(kcap-kcap(-1)) = lambda*(kcapstar-kcap);
kgstar = teta1*(oa+po+e-p);
khstar = teta2*(oa+po+e-p);
kcapstar = teta3*(oa+po+e-p);
bd = beta12*((m-m(-1))-(p-p(-1)));
tx = beta13*(oa+po+e-p) + (1-beta13)*nos;
xn = beta14*(e+pstar-p) + beta15*ystar;
mn = beta16*y - beta17*(e+pstar-p);
y = nu*nos + (1-nu)*oa + (1-nu-mu2)*po + (mu1-nu)*(e-w) - (1-mu1-mu2)*pstar;
yp = nu*nosp + (1-nu)*op + (1-nu-mu2)*po + (mu1-nu)*(e-w) - (1-mu1-mu2)*pstar;
//asset market
m-p = epsilon1*nos - epsilon2*(p-p(-1)) - epsilon3*r;
wp = epsilon5*kp + epsilon6*(m-p)+ epsilon7*yp;
(m-m(-1)) = tau*(r-rstar)+ f-f(-1);
//aggregate suplly and wage price nexus
p = mu1*w + mu2*(e+po) + (1-mu1-mu2)*(e+pstar);
(w-w(-1)) = psi1*(nod-nos) + psi2*(p-p(-1));
nos = phi1*kp + phi2*kg + phi3*kh + phi4*kcap + phi5*em;
//oversea sector
(f-f(-1)) = alpha1*(xn-mn) + alpha2*(rstar*f)+ alpha3*(ox+po)-(1-alpha2-alpha3)*(e-p);
ox = zeta*(oa-y);
is endogenous variable and exogenous variable correct?
which equation is useless or can be omitted?
please help me?