Various changes in tests/dsge-var mod files.
+ Changed comments. + Use new Dynare's interface for specifying the version of numgrad.time-shift
parent
a96d361599
commit
823ed85e8d
|
@ -1,10 +1,10 @@
|
|||
//$ Declaration of the endogenous variables of the DSGE model.
|
||||
// Declaration of the endogenous variables of the DSGE model.
|
||||
var a g mc mrs n winf pie r rw y;
|
||||
|
||||
//$ Declaration of the exogenous variables of the DSGE model.
|
||||
// Declaration of the exogenous variables of the DSGE model.
|
||||
varexo e_a e_g e_lam e_ms;
|
||||
|
||||
//$ Declaration of the deep parameters
|
||||
// Declaration of the deep parameters
|
||||
parameters invsig delta gam rho gampie gamy rhoa rhog bet
|
||||
thetabig omega eps ;
|
||||
|
||||
|
@ -22,7 +22,6 @@ rhog=0.5;
|
|||
rho=0.5;
|
||||
|
||||
|
||||
//$ Specification of the DSGE model used as a prior of the VAR model.
|
||||
model(linear);
|
||||
|
||||
y=y(+1)-(1/invsig)*(r-pie(+1)+g(+1)-g);
|
||||
|
@ -35,17 +34,17 @@ model(linear);
|
|||
g=rhog*g(-1)+e_g;
|
||||
rw=mrs;
|
||||
|
||||
//$ HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
|
||||
// HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
|
||||
// pie = (omega/(1+omega*bet))*pie(-1)+(bet/(1+omega*bet))*pie(1)+(1-delta)*
|
||||
// (1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))/(1+omega*bet)*(mc+e_lam);
|
||||
|
||||
//$ FORWARD LOOKING PHILLIPS CURVE:
|
||||
// FORWARD LOOKING PHILLIPS CURVE:
|
||||
pie=bet*pie(+1)+(1-delta)*(1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))*(mc+e_lam);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
//$ Declaration of the prior beliefs about the deep parameters.
|
||||
// Declaration of the prior beliefs about the deep parameters.
|
||||
estimated_params;
|
||||
stderr e_a, uniform_pdf,,,0,2;
|
||||
stderr e_g, uniform_pdf,,,0,2;
|
||||
|
@ -61,20 +60,24 @@ estimated_params;
|
|||
rhog, uniform_pdf,,,0,1;
|
||||
thetabig, gamma_pdf, 3, 1.42, 1, ;
|
||||
|
||||
//$Parameter for the hybrid Phillips curve
|
||||
//omega, uniform_pdf,,,0,1;
|
||||
// Parameter for the hybrid Phillips curve
|
||||
// omega, uniform_pdf,,,0,1;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
//$ Declaration of the observed endogenous variables. Note that they are the variables of the VAR (4 by default) and that we must
|
||||
//$ have as many observed variables as exogenous variables.
|
||||
/*
|
||||
** Declaration of the observed endogenous variables. Note that they are the variables of the VAR (4 by default) and that we must
|
||||
** have as many observed variables as exogenous variables.
|
||||
*/
|
||||
varobs pie r rw y;
|
||||
|
||||
options_.gradient_method = 3;
|
||||
|
||||
//$ The option dsge_var=.8 triggers the estimation of a DSGE-VAR model, with a calibrated dsge prior weight equal to .8.
|
||||
//$ The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
|
||||
//$ The Dashed lines are the first, fifth (ie the median) and ninth posterior deciles of the DSGE-VAR's IRFs, the bold dark curve is the
|
||||
//$ posterior median of the DSGE's IRfs and the shaded surface covers the space between the first and ninth posterior deciles of the DSGE's IRFs.
|
||||
estimation(datafile=datarabanal_hybrid,first_obs=50,mh_nblocks = 1,nobs=90,dsge_var=.8,mode_compute=4,mh_replic=2000,bayesian_irf);
|
||||
/* REMARK 1.
|
||||
** The option dsge_var=.8 triggers the estimation of a DSGE-VAR model, with a calibrated dsge prior weight equal to .8.
|
||||
**
|
||||
** REMARK 2.
|
||||
** The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
|
||||
** The Dashed lines are the first, fifth (ie the median) and ninth posterior deciles of the DSGE-VAR's IRFs, the bold dark curve is the
|
||||
** posterior median of the DSGE's IRfs and the shaded surface covers the space between the first and ninth posterior deciles of the DSGE's IRFs.
|
||||
*/
|
||||
estimation(datafile=datarabanal_hybrid,first_obs=50,mh_nblocks = 1,nobs=90,dsge_var=.8,optim=('NumgradAlgorithm',3),mode_compute=4,mh_replic=2000,bayesian_irf);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
//$ Declaration of the endogenous variables of the DSGE model.
|
||||
// Declaration of the endogenous variables of the DSGE model.
|
||||
var a g mc mrs n winf pie r rw y;
|
||||
|
||||
//$ Declaration of the exogenous variables of the DSGE model.
|
||||
// Declaration of the exogenous variables of the DSGE model.
|
||||
varexo e_a e_g e_lam e_ms;
|
||||
|
||||
//$ Declaration of the deep parameters
|
||||
// Declaration of the deep parameters
|
||||
parameters invsig delta gam rho gampie gamy rhoa rhog bet
|
||||
thetabig omega eps ;
|
||||
|
||||
|
@ -21,8 +21,6 @@ rhoa=0.5;
|
|||
rhog=0.5;
|
||||
rho=0.5;
|
||||
|
||||
|
||||
//$ Specification of the DSGE model used as a prior of the VAR model.
|
||||
model(linear);
|
||||
|
||||
y=y(+1)-(1/invsig)*(r-pie(+1)+g(+1)-g);
|
||||
|
@ -35,19 +33,20 @@ model(linear);
|
|||
g=rhog*g(-1)+e_g;
|
||||
rw=mrs;
|
||||
|
||||
//$ HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
|
||||
// HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
|
||||
// pie = (omega/(1+omega*bet))*pie(-1)+(bet/(1+omega*bet))*pie(1)+(1-delta)*
|
||||
// (1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))/(1+omega*bet)*(mc+e_lam);
|
||||
|
||||
//$ FORWARD LOOKING PHILLIPS CURVE:
|
||||
// FORWARD LOOKING PHILLIPS CURVE:
|
||||
pie=bet*pie(+1)+(1-delta)*(1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))*(mc+e_lam);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
//$ Declaration of the prior beliefs about the deep parameters and the weight of the DSGE prior.
|
||||
//$ The declaration of the estimated parameters dsge_prior_weight triggers the estimation of a DSGE-VAR model.
|
||||
//$ Note that dsge_prior_weight is not declared as a parameter at the top of the mod file.
|
||||
/*
|
||||
** Declaration of the prior beliefs about the deep parameters AND the weight of the DSGE prior.
|
||||
** Note that dsge_prior_weight is not declared as a parameter at the top of the mod file.
|
||||
*/
|
||||
estimated_params;
|
||||
stderr e_a, uniform_pdf,,,0,2;
|
||||
stderr e_g, uniform_pdf,,,0,2;
|
||||
|
@ -63,20 +62,27 @@ estimated_params;
|
|||
rhog, uniform_pdf,,,0,1;
|
||||
thetabig, gamma_pdf, 3, 1.42, 1, ;
|
||||
|
||||
//$Parameter for the hybrid Phillips curve
|
||||
//omega, uniform_pdf,,,0,1;
|
||||
// Parameter for the hybrid Phillips curve
|
||||
// omega, uniform_pdf,,,0,1;
|
||||
|
||||
dsge_prior_weight, uniform_pdf,,,0,1.9;
|
||||
end;
|
||||
|
||||
|
||||
//$ Declaration of the observed endogenous variables. Note that they are the variables of the VAR (4 by default) and that we must
|
||||
//$ have as many observed variables as exogenous variables.
|
||||
/* Declaration of the observed endogenous variables. Note that they are the variables of the VAR (with 4 lags by default) and that we must
|
||||
** have as many observed variables as exogenous variables.
|
||||
*/
|
||||
|
||||
varobs pie r rw y;
|
||||
|
||||
options_.gradient_method = 3;
|
||||
/* REMARK 1.
|
||||
** The dsge_var option triggers the estimation of a DSGE-VAR model instead of the plain DSGE model. The weight of the DSGE prior, dsge_prior_weight,
|
||||
** is estimated. The prior of this parameter is defined in the estimated_params block.
|
||||
**
|
||||
** REMARK 2.
|
||||
** The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
|
||||
** The Dashed lines are the first, fifth (ie the median) and ninth posterior deciles of the DSGE-VAR's IRFs, the bold dark curve is the
|
||||
** posterior median of the DSGE's IRfs and the shaded surface covers the space between the first and ninth posterior deciles of the DSGE's IRFs.
|
||||
*/
|
||||
|
||||
//$ The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
|
||||
//$ The Dashed lines are the first, fifth (ie the median) and ninth posterior deciles of the DSGE-VAR's IRFs, the bold dark curve is the
|
||||
//$ posterior median of the DSGE's IRfs and the shaded surface covers the space between the first and ninth posterior deciles of the DSGE's IRFs.
|
||||
estimation(datafile=datarabanal_hybrid,first_obs=50,mh_nblocks = 1,nobs=90,dsge_var,mode_compute=4,mh_replic=2000,bayesian_irf);
|
||||
estimation(datafile=datarabanal_hybrid,first_obs=50,mh_nblocks = 1,nobs=90,dsge_var,mode_compute=4,optim=('NumgradAlgorithm',3),mh_replic=2000,bayesian_irf);
|
||||
|
|
Loading…
Reference in New Issue