I’ve been unable to run it using bayesian estimation, and I’ve been having the following problem, which is my run interface problem.
Residuals of the static equations:
Equation number 1 : NaN
Equation number 2 : NaN
Equation number 3 : NaN
Equation number 4 : NaN
Equation number 5 : NaN
Equation number 6 : NaN
Equation number 7 : NaN
Equation number 8 : NaN
Equation number 9 : NaN
Equation number 10 : NaN
Equation number 11 : NaN
Equation number 12 : NaN
Equation number 13 : NaN
Equation number 14 : NaN
Equation number 15 : NaN
Equation number 16 : NaN
Equation number 17 : NaN
Equation number 18 : NaN
Equation number 19 : NaN
Equation number 20 : NaN
Equation number 21 : NaN
错误使用 print_info (line 90)
The steady state contains NaN or Inf
出错 steady (line 104)
print_info(info,options_.noprint, options_);
出错 bys (line 339)
steady;
出错 dynare (line 235)
evalin(‘base’,fname) ;
Here’s my code
var y r pi mg eg chi mc ec a z phi xi upsilon mug y_obs pi_obs mc_obs mg_obs r_obs chi_obs phi_obs;
varexo epsilon_a epsilon_eg epsilon_ec epsilon_z epsilon_xi epsilon_upsilon epsilon_r;
parameters omega_1 beta theta omega_2 omega_3 gamma_1 gamma_2 gamma_3 gamma_4
gamma_5 gamma_6 gamma_7 gamma_8 rho xi_phi rho_r rho_y rho_pi rho_mug rho_a rho_eg rho_ec rho_z rho_xi rho_upsilon;
omega_1=1;
theta=0.8;
beta=0.98;
omega_2=0.195;
omega_3=0.035;
gamma_1=0.021;
gamma_2=0.14;
gamma_3=0.664;
gamma_4=0.554;
gamma_5=0.013;
gamma_6=0.155;
gamma_7=1.034;
gamma_8=1.011;
rho=0.777;
xi_phi=0.572;
rho_r=0.808;
rho_y=0.153;
rho_pi=1.980;
rho_mug=0.459;
rho_a=0.668;
rho_eg=0.623;
rho_ec=0.622;
rho_z=0.996;
rho_xi=0.679;
rho_upsilon=0.703;
model;
y_obs=ln(y);
pi_obs=pi;
mc_obs=mc;
mg_obs=ln(mg);
r_obs=r;
chi_obs=chi;
phi_obs=phi;
y=y(+1)-omega_1*(r-pi(+1))+omega_2*((mg-eg)-(mg(+1)-eg(+1)))+omega_3*((chi+mc-ec)-(chi(+1)+mc(+1)-ec(+1)))+omega_1*(a-a(+1));
mg=gamma_1*y-gamma_2*r+gamma_3*eg-gamma_4*chi-gamma_4*mc+gamma_4*ec;
mc=gamma_5*y-gamma_6*r+gamma_7*ec-gamma_8*chi-gamma_8*mg+gamma_8*eg;
pi=beta*pi(+1)+(1-theta)*(1-beta*theta)/theta*((1/omega_1)*y-(omega_2/omega_1)*(mg-eg)-(omega_3/omega_1)*(chi+mc-ec)-z);
chi=-rho*phi;
phi=xi_phi*xi+(1-xi_phi)*upsilon;
r=rho_r*r(-1)+(1-rho_r)*rho_y*y+(1-rho_r)*rho_pi*pi+(1-rho_r)*rho_mug*mug+epsilon_r;
mug=mg-mg(-1);
a=rho_a*a(-1)+epsilon_a;
eg=rho_eg*eg(-1)+epsilon_eg;
ec=rho_ec*ec(-1)+epsilon_ec;
xi=rho_xi*xi(-1)+epsilon_xi;
upsilon=rho_upsilon*upsilon(-1)+epsilon_upsilon;
z=rho_z*z(-1)+epsilon_z;
end;
varobs y_obs pi_obs mc_obs mg_obs r_obs chi_obs phi_obs;
initval;
y=0;
r=0;
pi=0;
mg=0;
eg=0;
chi=0;
mc=0;
ec=0;
a=0;
z=0;
phi=0;
xi=0;
upsilon=0;
mug=0;
end;
steady;
estimated_params;
theta,beta_pdf,0.8,0.05;
omega_2,gamma_pdf,0.2,0.05;
omega_3,gamma_pdf,0.05,0.01;
gamma_1,gamma_pdf,0.015,0.005;
gamma_2,gamma_pdf,0.15,0.05;
gamma_3,gamma_pdf,0.9,0.1;
gamma_4,gamma_pdf,0.5,0.05;
gamma_5,gamma_pdf,0.015,0.005;
gamma_6,gamma_pdf,0.15,0.05;
gamma_7,gamma_pdf,0.8,0.1;
gamma_8,gamma_pdf,0.6,0.1;
rho,gamma_pdf,0.9,0.1;
xi_phi,gamma_pdf,0.5,0.05;
rho_r,beta_pdf,0.8,0.05;
rho_y,beta_pdf,0.2,0.01;
rho_pi,gamma_pdf,1.8,0.05;
rho_mug,beta_pdf,0.2,0.05;
rho_a,beta_pdf,0.7,0.05;
rho_eg,beta_pdf,0.65,0.05;
rho_ec,beta_pdf,0.55,0.05;
rho_z,beta_pdf,0.9,0.05;
rho_xi,beta_pdf,0.6,0.05;
rho_upsilon,beta_pdf,0.6,0.05;
stderr epsilon_a,inv_gamma_pdf,0.01,inf;
stderr epsilon_eg,inv_gamma_pdf,0.01,inf;
stderr epsilon_ec,inv_gamma_pdf,0.01,inf;
stderr epsilon_z,inv_gamma_pdf,0.01,inf;
stderr epsilon_xi,inv_gamma_pdf,0.01,inf;
stderr epsilon_upsilon,inv_gamma_pdf,0.01,inf;
stderr epsilon_r,inv_gamma_pdf,0.01,inf;
end;
estimation(datafile=sysj2,mode_compute=6,mh_replic=2000,mh_jscale=0.8,mode_check,bayesian_irf);