MCFEVDTABLE (Confidence bands for FEVD)
This is a procedure for generating error bands for the FEVD (forecast error variance decomposition) in a VAR using the output from a Monte Carlo procedure such as MCVARDODRAWS.
Updated 30 August 2012 to add PICTURE option.
Note: this assumes that the shocks used in generating the IRF's are orthogonal and produce a complete factorization of the covariance matrix. It cannot be used with isolated shocks (from, for instance, sign restrictions). It needs to compute a separate decomposition for each draw and aggregates those. Note that FEVD's are very asymmetrical and it is not uncommon for the point estimate of the FEVD from least squares estimation of the VAR to be outside the confidence interval, particularly near the zero end.
@MCFEVDTABLE(MODEL=model used in generating responses,other options)
Options
SHOCKLABELS=VECT[STRINGS] of labels for the shocks [dependent variables of model]
VARLABELS=VECT[STRING] of labels for the variables [dependent variables of model]
INCLUDE=||list of dependent variables to show (in order, by position in model)|| [all]
INCLUDE can be used to eliminate some variables which aren't of special interest or to rearrange the panes on a graph. For instance, in a 6 variable VAR, INCLUDE=||6,1,3,4|| will show only the responses of those four variables (based upon their positions in the model) and will put the 6th variable in the top left.
HORIZONS=VECT[INT] of forecast horizons to include [||1,2,3,4,8,12,40||]
PERCENTILES=||percentiles for lower and upper bounds|| [||.16,.84||]
STDDEV=# of standard deviations from mean for lower and upper bounds [not used]
STDDEV is used for doing error bands based upon multiples of the sample standard deviations. For instance, STDDEV=1.0 will give upper and lower bounds that are one standard deviation above and below the mean response. PERCENTILES is the default.
TABLE=[BYVARIABLE]/BYSHOCK
Organization for the table
PICTURE=picture code for displaying percentages ["##.#"]
Example
Updated 30 August 2012 to add PICTURE option.
Note: this assumes that the shocks used in generating the IRF's are orthogonal and produce a complete factorization of the covariance matrix. It cannot be used with isolated shocks (from, for instance, sign restrictions). It needs to compute a separate decomposition for each draw and aggregates those. Note that FEVD's are very asymmetrical and it is not uncommon for the point estimate of the FEVD from least squares estimation of the VAR to be outside the confidence interval, particularly near the zero end.
@MCFEVDTABLE(MODEL=model used in generating responses,other options)
Options
SHOCKLABELS=VECT[STRINGS] of labels for the shocks [dependent variables of model]
VARLABELS=VECT[STRING] of labels for the variables [dependent variables of model]
INCLUDE=||list of dependent variables to show (in order, by position in model)|| [all]
INCLUDE can be used to eliminate some variables which aren't of special interest or to rearrange the panes on a graph. For instance, in a 6 variable VAR, INCLUDE=||6,1,3,4|| will show only the responses of those four variables (based upon their positions in the model) and will put the 6th variable in the top left.
HORIZONS=VECT[INT] of forecast horizons to include [||1,2,3,4,8,12,40||]
PERCENTILES=||percentiles for lower and upper bounds|| [||.16,.84||]
STDDEV=# of standard deviations from mean for lower and upper bounds [not used]
STDDEV is used for doing error bands based upon multiples of the sample standard deviations. For instance, STDDEV=1.0 will give upper and lower bounds that are one standard deviation above and below the mean response. PERCENTILES is the default.
TABLE=[BYVARIABLE]/BYSHOCK
Organization for the table
PICTURE=picture code for displaying percentages ["##.#"]
Example
- Code: Select all
*
* Replication for Blanchard and Quah(1989), "The Dynamic Effects of
* Aggregate Demand and Supply Disturbances", AER, vol 79, no. 4, pp
* 655-673.
*
* This includes the figures and tables that require simulations. Note
* that BQ used bootstrapping, which did not work well in this case. This
* is a point made in Sims and Zha(1999), "Error Bands for Impulse
* Responses", Econometrica, vol 67, no. 5, pp 1113-1156. These are done
* by Monte Carlo integration with the standard "Jeffrey's" prior.
*
cal(q) 1948
open data bqdata.xls
data(format=xls,org=cols) 1948:1 1987:4 gnp gd87 lhmur
*
* Generate log real GNP from the gnp and the price deflator
*
set loggnp = log(gnp)
set loggd = log(gd87)
set logrgnp = loggnp-loggd+log(100)
set dlogrgnp = 100.0*(logrgnp-logrgnp{1})
*
* BQ de-mean the GNP growth data with separate values for two subsamples.
*
set dummy1 = t<=1973:4
set dummy2 = t>1973:4
*
linreg dlogrgnp
# dummy1 dummy2
set gnpadjust = %resids
prj removed
*
* The unemployment rate is detrended
*
filter(remove=trend) lhmur / uradjust
*
*****************************************
compute [vect[strings]] shocklabels=||"Supply","Demand"||
compute [vect[strings]] varlabels=||"Output","Unemployment"||
*
system(model=varmodel)
var gnpadjust uradjust
lags 1 to 8
det constant
end(system)
*
estimate(noprint)
@BQDoDraws(model=varmodel)
@MCGraphIRF(model=varmodel,shocklabels=shocklabels,varlabels=varlabels)
*
disp "Table 2-Variance Decomposition. Output growth break; Unemployment Detrended"
@MCFEVDTable(model=varmodel,horizons=||1,2,3,4,8,12,40||,$
varlabels=varlabels,shocklabels=shocklabels,table=byshocks)