| 1 |
@#include "ls2003_model.inc" |
| 2 |
|
| 3 |
estimated_params; |
| 4 |
psi1 , gamma_pdf,1.5,0.5; |
| 5 |
psi2 , gamma_pdf,0.25,0.125; |
| 6 |
psi3 , gamma_pdf,0.25,0.125; |
| 7 |
rho_R ,beta_pdf,0.5,0.2; |
| 8 |
alpha ,beta_pdf,0.3,0.1; |
| 9 |
rr ,gamma_pdf,2.5,1; |
| 10 |
k , gamma_pdf,0.5,0.25; |
| 11 |
tau ,gamma_pdf,0.5,0.2; |
| 12 |
rho_q ,beta_pdf,0.4,0.2; |
| 13 |
rho_A ,beta_pdf,0.5,0.2; |
| 14 |
rho_ys ,beta_pdf,0.8,0.1; |
| 15 |
rho_pies,beta_pdf,0.7,0.15; |
| 16 |
/* |
| 17 |
stderr e_R,inv_gamma_pdf,(1.2533),(0.6551); |
| 18 |
stderr e_q,inv_gamma_pdf,(2.5066),(1.3103); |
| 19 |
stderr e_A,inv_gamma_pdf,(1.2533),(0.6551); |
| 20 |
stderr e_ys,inv_gamma_pdf,(1.2533),(0.6551); |
| 21 |
stderr e_pies,inv_gamma_pdf,(1.88),(0.9827); |
| 22 |
*/ |
| 23 |
stderr e_R,inv_gamma_pdf,(1.2533/3),(0.6551/10); |
| 24 |
stderr e_q,inv_gamma_pdf,(2.5066/3),(1.3103/10); |
| 25 |
stderr e_A,inv_gamma_pdf,(1.2533/3),(0.6551/10); |
| 26 |
stderr e_ys,inv_gamma_pdf,(1.2533/3),(0.6551/10); |
| 27 |
stderr e_pies,inv_gamma_pdf,(1.88/3),(0.9827/10); |
| 28 |
end; |
| 29 |
|
| 30 |
// endogenous prior restrictions |
| 31 |
irf_calibration(relative_irf); |
| 32 |
y(1:4), e_ys, [ -50, 50]; //[first year response] |
| 33 |
//y(1:4), e_ys, [-inf -50]; //[first year response] |
| 34 |
@#for ilag in 21:40 |
| 35 |
R_obs(@{ilag}), e_ys, [0, 6]; //[response after 4th year to 10th year] |
| 36 |
@#endfor |
| 37 |
end; |
| 38 |
|
| 39 |
/* |
| 40 |
irf_calibration; |
| 41 |
y(1:4), e_ys, [-inf, -0.4]; //[first year response] |
| 42 |
@#for ilag in 21:40 |
| 43 |
R_obs(@{ilag}), e_ys, [0, 0.25]; //[response after 4th year to 10th year] |
| 44 |
@#endfor |
| 45 |
end; |
| 46 |
*/ |
| 47 |
|
| 48 |
moment_calibration; |
| 49 |
//y_obs,y_obs, [0.8, 1.1]; //[unconditional variance] |
| 50 |
y_obs,y_obs(1:4), +; //[first year acf] |
| 51 |
//y_obs,pie_obs(-4:4), -; //[ccf] |
| 52 |
@#for ilag in -2:2 |
| 53 |
y_obs,R_obs(@{ilag}), -; //[ccf] |
| 54 |
@#endfor |
| 55 |
@#for ilag in -4:4 |
| 56 |
y_obs,pie_obs(@{ilag}), -; //[ccf] |
| 57 |
@#endfor |
| 58 |
end; |
| 59 |
|
| 60 |
options_.prior_mc=5000; |
| 61 |
|
| 62 |
prior simulate; |
| 63 |
prior moments(distribution); |
| 64 |
|
| 65 |
if isoctave() |
| 66 |
sensitivity(prior_range=0, nodisplay, graph_format=(eps),Nsam=512); |
| 67 |
else |
| 68 |
sensitivity(prior_range=0, nodisplay, graph_format=(fig),Nsam=512); |
| 69 |
end |
| 70 |
|
| 71 |
/* |
| 72 |
estimation(datafile='data_ca1.m',first_obs=8,nobs=79,mh_nblocks=2, mode_file = ls2003a_mode, |
| 73 |
prefilter=1,mh_jscale=0.5,mh_replic=5000, mode_compute=0, mh_drop=0.6, bayesian_irf); |
| 74 |
//stoch_simul(irf=40, order=1, relative_irf) y_obs R_obs pie_obs dq de; |
| 75 |
stoch_simul(irf=40, order=1) y_obs R_obs pie_obs dq de; |
| 76 |
*/ |