please help me to debug the program,where is wrong.
Posted: Sat Aug 16, 2014 2:37 am
//-----------内生变量25个------------//
var c H m mc q v i k rk w d tax y lc lh l z n u rf g TI gdp b RD RL A e f;
//--------外生变量3个------------//
varexo eps_A eps_e eps_f;
//------------参数----------------//
parameters alpha beta gamma delta epsilon zeta theta lamda xi rho sigma phi chi omega s rho_e sigma_a sigma_e c1 c2 c3 sigma_R rho_f sigma_f ;
//--------------校准值----------------//
alpha=0.49;
beta=0.99;
gamma=0.82;
delta=0.025;
epsilon=
zeta=0.08;
theta=6;
lambda=0.5;
xi=0.5;
rho=0.2;
sigma=0.91;
phi=0.05;
chi=1.2;
omega=0.2;
s=0.25;
e=0.22;
rho_e=0.95;
sigma_a=0.02;
sigma_e=0.0632;
c1=0.1858;
c2=0.312;
c3=0.8375
sigma_R=0.0017;
rho_f=0.63;
sigma_f=0.47;
//------------稳态关系----------------//
model(linear);
#f_ss=825;
#rk_ss=1/beta-(1-delta);
#b_ss=(theta-1)/theta;
#RD_ss=1/beta-1;
#u_ss=beta*(1+RD_ss);
#v_ss=u_ss;
#RL_ss=(phi+RD_ss*((1-zeta)/(1-e)))/(1-phi);
#y_ss=7590;
#k_ss=(1-psi)*alpha*b_ss*y_ss;
#w_ss=(1-psi)*(1-alpha)*b_ss*y_ss;
#lc_ss=psi*b_ss*y_ss/RL_ss;
#i_ss=delta*k_ss;
#lh_ss=rho*w_ss/((1-xi)*(1-rho)*RL_ss);
#H_ss=A*lh_ss^rho*825^(xi*(1-rho));
#q_ss=w_ss/((1-xi)*(1-rho)*H_ss);
#rf_ss=(beta*w_ss*xi)/(f_ss*(1-xi));
#l_ss=lc_ss+lh_ss;
#n_ss=(phi+s)*l_ss;
#z_ss=zeta*l_ss;
#d_ss=(l_ss-z_ss)/(1-e);
#c_ss=(H_ss^(-gamma)/q_ss)^(-1/sigma);
#mc_ss=(c_ss^(-sigma)*(1-beta))^(1/chi);
#TI_ss=i_ss+n_ss-s*l_ss;
#g_ss=y_ss-TI_ss-c_ss;
#tax_ss=g_ss-rf_ss*f_ss;
#gdp_ss=y_ss+q_ss*H_ss;
//---------家庭-----------//
i_ss*i-k_ss*k+(1-delta)*k_ss*k(-1)=0;//eq1
sigma*c+q+gamma*H=0;//eq2
chi*mc_ss^(-chi)*mc-sigma*c_ss^(-sigma)*c+beta*sigma*(c_ss^(-sigma)/u_ss)*c(+1)+beta*(c_ss^(-sigma)/u_ss)*u(+1)=0;//eq3
chi*mc-sigma*c+RD=0;//eq4
y-A-psi*lc-alpha*(1-psi)*k=0;//eq5
y+b-k-rk=0;//eq6
//-----------厂商-------------//
y+b-w=0;//eq7
y+b-lc-RL=0;//eq8
(1-e)*d_ss*d-e_ss*d_ss*e-l_ss*l+z_ss*z=0;//eq9
-sigma*c(+1)+sigma*c+beta*rk_ss*rk(+1)=0;//eq10
//-----------房地产商-----------//
H(+1)-A(+1)-rho*lh(+1)-(1-rho)*xi*f=0;//eq11
v+q(-1)-q-u=0;//eq12
q+H-lh-RL=0;//eq13
q+H-w=0;//eq14
beta*xi*(1-rho)*q_ss*H_ss/f_ss*(q(+1)+H(+1)-f)-rf_ss*rf=0;//eq15
//------------商业银行----------//
z-zeta*l=0;//eq16
m_ss*m-mc_ss*mc-d_ss*d=0;//eq17
l_ss*l(+1)-(1-phi-s)*l_ss*l-n_ss*n(+1)=0;//eq18
l_ss*l-lc_ss*lc-lh_ss*lh=0;//eq19
(1-phi)*RL_ss*RL-((1-xi)/(1-e))*RD_ss*RD-(((1-phi)*RL_ss-phi)/(1-e))*e_ss*e+(1-phi-s)*beta*((1-phi)*RL_ss*RL(+1)-((1-zeta)/(1-e_ss))*RD_ss*RD(+1)-((1-phi)*RL_ss-phi)/(1-e_ss))*e_ss*e(+1)=0;//eq20
//------------政府--------------//
rf_ss*rf+rf_ss*f-g_ss*g+tax_ss*tax=0;//eq21
TI_ss*TI-i_ss*i-n_ss*n+s*l_ss*l=0;//eq22
y_ss*y-c_ss*c-TI_ss*TI-g_ss*g=0;//eq23
gdp_ss*gdp-y_ss*y-q_ss*H_ss*q-q_ss*H_ss*H=0;//eq24
RD_ss*RD-(1-c3)*c1*u_ss*u(+1)-(1-c3)*c2*y-c3*RD_ss*RD(-1)=0;//eq25
//----------冲击过程3个---------------//
// EXOGENOUS EQUATIONS:
A(+1)-rho*A-eps_A(+1)=0;//eq26
e(+1)-rho_e*e-eps_e(+1)=0;//eq27
f(+1)-rho_f*f-eps_f(+1)=0;//eq28
end;
steady;
check;
chocks;
stderr 0.0092;
var eps_A;
stderr 0.0027;
var eps_e;
stderr 0.0057;
var eps_f;
end;
stoch_simul(irf=20) A e f;
var c H m mc q v i k rk w d tax y lc lh l z n u rf g TI gdp b RD RL A e f;
//--------外生变量3个------------//
varexo eps_A eps_e eps_f;
//------------参数----------------//
parameters alpha beta gamma delta epsilon zeta theta lamda xi rho sigma phi chi omega s rho_e sigma_a sigma_e c1 c2 c3 sigma_R rho_f sigma_f ;
//--------------校准值----------------//
alpha=0.49;
beta=0.99;
gamma=0.82;
delta=0.025;
epsilon=
zeta=0.08;
theta=6;
lambda=0.5;
xi=0.5;
rho=0.2;
sigma=0.91;
phi=0.05;
chi=1.2;
omega=0.2;
s=0.25;
e=0.22;
rho_e=0.95;
sigma_a=0.02;
sigma_e=0.0632;
c1=0.1858;
c2=0.312;
c3=0.8375
sigma_R=0.0017;
rho_f=0.63;
sigma_f=0.47;
//------------稳态关系----------------//
model(linear);
#f_ss=825;
#rk_ss=1/beta-(1-delta);
#b_ss=(theta-1)/theta;
#RD_ss=1/beta-1;
#u_ss=beta*(1+RD_ss);
#v_ss=u_ss;
#RL_ss=(phi+RD_ss*((1-zeta)/(1-e)))/(1-phi);
#y_ss=7590;
#k_ss=(1-psi)*alpha*b_ss*y_ss;
#w_ss=(1-psi)*(1-alpha)*b_ss*y_ss;
#lc_ss=psi*b_ss*y_ss/RL_ss;
#i_ss=delta*k_ss;
#lh_ss=rho*w_ss/((1-xi)*(1-rho)*RL_ss);
#H_ss=A*lh_ss^rho*825^(xi*(1-rho));
#q_ss=w_ss/((1-xi)*(1-rho)*H_ss);
#rf_ss=(beta*w_ss*xi)/(f_ss*(1-xi));
#l_ss=lc_ss+lh_ss;
#n_ss=(phi+s)*l_ss;
#z_ss=zeta*l_ss;
#d_ss=(l_ss-z_ss)/(1-e);
#c_ss=(H_ss^(-gamma)/q_ss)^(-1/sigma);
#mc_ss=(c_ss^(-sigma)*(1-beta))^(1/chi);
#TI_ss=i_ss+n_ss-s*l_ss;
#g_ss=y_ss-TI_ss-c_ss;
#tax_ss=g_ss-rf_ss*f_ss;
#gdp_ss=y_ss+q_ss*H_ss;
//---------家庭-----------//
i_ss*i-k_ss*k+(1-delta)*k_ss*k(-1)=0;//eq1
sigma*c+q+gamma*H=0;//eq2
chi*mc_ss^(-chi)*mc-sigma*c_ss^(-sigma)*c+beta*sigma*(c_ss^(-sigma)/u_ss)*c(+1)+beta*(c_ss^(-sigma)/u_ss)*u(+1)=0;//eq3
chi*mc-sigma*c+RD=0;//eq4
y-A-psi*lc-alpha*(1-psi)*k=0;//eq5
y+b-k-rk=0;//eq6
//-----------厂商-------------//
y+b-w=0;//eq7
y+b-lc-RL=0;//eq8
(1-e)*d_ss*d-e_ss*d_ss*e-l_ss*l+z_ss*z=0;//eq9
-sigma*c(+1)+sigma*c+beta*rk_ss*rk(+1)=0;//eq10
//-----------房地产商-----------//
H(+1)-A(+1)-rho*lh(+1)-(1-rho)*xi*f=0;//eq11
v+q(-1)-q-u=0;//eq12
q+H-lh-RL=0;//eq13
q+H-w=0;//eq14
beta*xi*(1-rho)*q_ss*H_ss/f_ss*(q(+1)+H(+1)-f)-rf_ss*rf=0;//eq15
//------------商业银行----------//
z-zeta*l=0;//eq16
m_ss*m-mc_ss*mc-d_ss*d=0;//eq17
l_ss*l(+1)-(1-phi-s)*l_ss*l-n_ss*n(+1)=0;//eq18
l_ss*l-lc_ss*lc-lh_ss*lh=0;//eq19
(1-phi)*RL_ss*RL-((1-xi)/(1-e))*RD_ss*RD-(((1-phi)*RL_ss-phi)/(1-e))*e_ss*e+(1-phi-s)*beta*((1-phi)*RL_ss*RL(+1)-((1-zeta)/(1-e_ss))*RD_ss*RD(+1)-((1-phi)*RL_ss-phi)/(1-e_ss))*e_ss*e(+1)=0;//eq20
//------------政府--------------//
rf_ss*rf+rf_ss*f-g_ss*g+tax_ss*tax=0;//eq21
TI_ss*TI-i_ss*i-n_ss*n+s*l_ss*l=0;//eq22
y_ss*y-c_ss*c-TI_ss*TI-g_ss*g=0;//eq23
gdp_ss*gdp-y_ss*y-q_ss*H_ss*q-q_ss*H_ss*H=0;//eq24
RD_ss*RD-(1-c3)*c1*u_ss*u(+1)-(1-c3)*c2*y-c3*RD_ss*RD(-1)=0;//eq25
//----------冲击过程3个---------------//
// EXOGENOUS EQUATIONS:
A(+1)-rho*A-eps_A(+1)=0;//eq26
e(+1)-rho_e*e-eps_e(+1)=0;//eq27
f(+1)-rho_f*f-eps_f(+1)=0;//eq28
end;
steady;
check;
chocks;
stderr 0.0092;
var eps_A;
stderr 0.0027;
var eps_e;
stderr 0.0057;
var eps_f;
end;
stoch_simul(irf=20) A e f;