jpfeifer wrote:You should provide the calibration values of the parameters as initial values for estimation.
Thank you for your help.
But, I would still not completely clear how to do.i try several times ,but it still doesn't work.
here is the code,how can i do to Modify the program? Thank you very much,
@#define lags = [1:16]
var y a l p w yinfn i R pi outputgap yclas deltaa g nuu gam eps z zwage zoutput;
varexo e_deltaa e_g e_nuu e_gam e_eps;
parameters beta nu lambda theta delta omega gamma psi phi_pi phi_y rho_deltaa rho_eps rho_g rho_nuu rho_gam T;
// POSTERIOR MEAN, see Table 2 in paper
theta = 1.00000000000000;
psi = 5.15202697986071;
nu = 10.0866927574090;
gamma = 9.09210945073590;
beta = 0.666666666666667;
rho_deltaa = 0.0285825345078334;
rho_eps = 0.294610252638720;
rho_g = 0.996989047437769;
rho_nuu = 0.280541889680312;
rho_gam = 0.855785136269719;
phi_pi = 1.17350494813421;
phi_y = 0.0625290108287302;
delta = 0.0822178065824585;
omega = 0.744214139325477;
lambda = 0.516437987152365;
T=32;
model(linear);
//production function
y = a + beta*l;
// Phillips Curve
z = p + (beta*(w-p)+(1-beta)*y-a)/(beta+nu*(1-beta))-(beta*nuu)/((nu-1)*(beta+nu*(1-beta)));
p = lambda*( + z +
@#for lag in lags
+EXPECTATION(-@{lag})(z)*((1-lambda)^(@{lag}))
@#endfor
);
// Recursive long real interest rate
R = i - (p(+1)-p) + R(+1);
// IS Curve
yinfn = y(100);
zoutput = yinfn - theta*R;
y = g + delta*( + zoutput +
@#for lag in lags
+EXPECTATION(-@{lag})(zoutput)*((1-delta)^(@{lag}))
@#endfor
);
// Wage Curve
zwage = p + gamma*(w-p)/(gamma+psi) + l/(gamma+psi) + psi*(yinfn - theta*R)/(theta*(gamma+psi)) - psi*gam/((gamma+psi)*(gamma-1));
w = omega*( + zwage +
@#for lag in lags
+EXPECTATION(-@{lag})(zwage)*((1-omega)^(@{lag}))
@#endfor
);
// definition of inflation
pi = p - p(-1);
// Taylor rule
i = phi_y*(y-yclas) + phi_pi*pi - eps;
// Classical equilibrium
yclas = a + beta*psi/(1+psi)*(g+gam/(gamma-1)+nuu/(nu-1));
// other variables
deltaa = a-a(-1);
outputgap = y-yclas;
// shock processes
eps = rho_eps*eps(-1) + e_eps;
deltaa = rho_deltaa *deltaa(-1) + e_deltaa;
g = rho_g *g(-1) + e_g;
nuu = rho_nuu *nuu(-1) + e_nuu;
gam = rho_gam *gam(-1) + e_gam;
end;
//check;
//steady;
initval;
y=0;a=0;l=0; p=0; w=0; yinfn=0; i=0; R=0; pi=0; outputgap=0; yclas=0; deltaa=0; g=0; nuu=0; gam=0; eps=0; z=0; zwage=0; zoutput=0;
e_deltaa=0; e_g=0; e_nuu=0; e_gam=0; e_eps=0;
end;
shocks;
var e_deltaa; stderr 0.660134106707378;
var e_g; stderr 0.833976978078512;
var e_nuu; stderr 10.5679076888563;
var e_gam; stderr 12.3169555240614;
var e_eps; stderr 0.437308817102200;
end;
estimated_params;
theta , 1.000,1,1.5;
psi , 5.15202697986071,5,5.5;
nu , 10.0866927574090,10,10.1;
gamma , 9.09210945073590,9,9.5;
beta , 0.666666666666667,.6,.7;
rho_deltaa , 0.0285825345078334,.02,.03;
rho_eps , 0.294610252638720,.29,.3;
rho_g , 0.996989047437769,.9,1;
rho_nuu , 0.280541889680312,.28,.3;
rho_gam , 0.855785136269719,.8,.9;
phi_pi , 1.17350494813421,1,1.5;
phi_y , 0.0625290108287302,.06,.07;
delta , 0.0822178065824585,.08,.09;
omega , 0.744214139325477,.7,.8;
lambda , 0.516437987152365,.5,.6;
end;
varobs pi ;
estimation(datafile=Csige,mh_replic=32,mh_jscale=.5);