var Y Pi R eta_A eta_MU eta_XI;
varexo eps_A eps_MU eps_XI;
parameters sigmma theta phi alfa zetta betta PHI_ kappa_c chi_f chi_b R_a R_mu R_xi R_r R_pi R_y RHOA RHOMU RHOXI PSI flag MaxIter M_4_1;
MaxIter = 20000;
betta = 0.99; //discount;
RHOA = 0.5;
RHOMU = 0.5;
RHOXI = 0.5;
PSI = 1;
sigmma = 2.0; //intertemporal, >1
theta = 0.7; //habit
phi = 2; // labour, >0;
alfa = 0.75; //Calvo
zetta = 0.5; //inertia
R_a = 0;
R_mu = 0.;
R_xi =0.;
R_r = 1.1;
R_pi=0.5;
R_y =0.3;
model(linear);
Y = Y(+1)/(1+theta) + theta/(1+theta)*Y(-1) - (1-theta)/sigmma/(1+theta)*R + (1-theta)/sigmma/(1+theta)*Pi(+1) - (1-theta)/(1+theta)*(1-RHOXI)*eta_XI;
Pi = chi_f*betta*Pi(+1) + chi_b*Pi(-1) + kappa_c*(sigmma/(1-theta)+phi)*Y - kappa_c*sigmma*theta/(1-theta)*Y(-1) - kappa_c*(phi+1)*eta_A + kappa_c*eta_MU;
R = R_a*eta_A(-1) + R_mu*eta_MU(-1) + R_xi*eta_XI(-1) + R_r* R(-1) + R_pi*Pi(-1) + R_y*Y(-1);
eta_A = RHOA *eta_A(-1) + eps_A;
eta_MU = RHOMU *eta_MU(-1) + eps_MU;
eta_XI = RHOXI *eta_XI(-1) + eps_XI;
end;
steady;
check;
estimated_params;
stderr eps_A,16.64,0.025,25,INV_GAMMA_PDF,0.25,2;
stderr eps_MU,0.0230,0.001,25,INV_GAMMA_PDF,0.05,2;
stderr eps_XI,4.3290,0.025,25,INV_GAMMA_PDF,0.25,2;
RHOA,0.0880,0.0001,0.99999,BETA_PDF,0.5,0.15;
RHOMU,0.5017,0.0001,0.99999,BETA_PDF,0.5,0.15;
RHOXI,0.3302,0.0001,0.99999,BETA_PDF,0.5,0.15;
theta,0.5,0.01,0.999,BETA_PDF,0.5,0.15;
sigmma,2.0,1.01,10,NORMAL_PDF,2.0,0.25;
phi,2.5,1,4,NORMAL_PDF,2.5,0.25;
alfa,0.7663,0.5,0.85,BETA_PDF,0.75,0.02;
zetta,0.7525,0.05,0.9999,BETA_PDF,0.5,0.15;
R_r,0.497,0.0,1.0,BETA_PDF,0.5,0.15;
R_pi,0.5779,0.0001,0.999,NORMAL_PDF,0.5,0.15;
R_y,0.3064,-0.2,1,NORMAL_PDF,0.25,0.15;
end;
varobs Pi Y R;
options_.dynatol=1e-5;
options_.cutoff=1e-7;
estimation(datafile=US_data_80,lik_init=2,nobs=114,prefilter=1,mode_compute=1,mh_replic=0,mh_jscale=0.20,bayesian_irf,irf=100);