I am trying to estimate Bansal-Yaron (2009) model but i´m getting this error
You did not declare endogenous variables after the estimation command.
It repeats a thousand times.
Can anyone tell me what´s wrong?
thanks!
//This is Bansal-Yaron (2004) model for US and Brazil
//endogenous variables
var c d pc pd x;
//exogenous variables
varexo ec ex ed;
//parameters
parameters beta gamma psi mu_c mu_d rho tau;
beta =0.95;
gamma =2;
psi =1.5;
mu_c =0.01;
mu_d =0.01;
rho =0.9;
tau =3;
model;
c = mu_c + x(-1) +ec;
d = mu_d + tau*x(-1) + ed ;
x = rho*x(-1) + ex;
pc = beta^((1-gamma)/(1-(1/psi)))*exp((-((1-gamma)/(1-(1/psi)))/psi)*c(+1)+(((1-gamma)/(1-(1/psi)))-1)*log(((1+pc(+1))/pc)*exp(c(+1))))*(1+pc(+1))*exp(c(+1));
pd = beta^((1-gamma)/(1-(1/psi)))*exp((-((1-gamma)/(1-(1/psi)))/psi)*c(+1)+(((1-gamma)/(1-(1/psi)))-1)*log(((1+pc(+1))/pc)*exp(c(+1))))*(1+pd(+1))*exp(d(+1));
end;
initval;
c=mu_c;
d=mu_d;
x=0;
pc=0.01;
pd=0.01;
ec=0;
ex=0;
ed=0;
end;
shocks;
var ec; stderr .01;
var ed; stderr .01;
var ex; stderr .01;
end;
check;
steady;
estimated_params;
beta ,NORMAL_PDF ,0.98 ,0.05;
gamma ,NORMAL_PDF ,2 ,0.50;
psi ,NORMAL_PDF ,1.6 ,0.5;
mu_c ,NORMAL_PDF ,0.01 ,0.005;
mu_d ,NORMAL_PDF ,0.01 ,0.005;
rho ,NORMAL_PDF ,0.98 ,0.05;
tau ,NORMAL_PDF ,3 ,0.7;
stderr ed ,INV_GAMMA_PDF ,0.01 , .02;
stderr ex ,INV_GAMMA_PDF ,0.001 , .02;
stderr ec ,INV_GAMMA_PDF ,0.001 , .02;
end;
varobs c d pd;
estimation(datafile=databy04,xls_sheet=ready,xls_range=g2:i121,mode_compute=3,mh_replic=1000,mh_nblocks=2);
beta^((1-gamma)/(1-(1/psi)))
Users browsing this forum: No registered users and 9 guests