postshock provides donor-adjusted methods for
forecasting conditional means and variances after structural shocks.
Historical donor episodes are weighted using information observed before
each shock, and their estimated post-shock effects are combined with
forecasts from a target-series model.
The package builds on the methodology of Lin and Eck (2021) and extends it with practical tools for donor weighting, conditional mean forecasting, volatility forecasting, structured donor pools, and automatic GARCH-X model selection.
dbw())Estimate donor weights from pre-shock covariates so that weighted donor characteristics resemble those of the target series.
Features include:
SynthPrediction())Generate donor-adjusted forecasts by
Support multiple donor pools representing different economic or substantive mechanisms, allowing donor effects to be estimated and combined within predefined groups.
auto_garchx())Automatically search across GARCH-X and GJR-GARCH specifications using information criteria.
Supported features include
SynthVolForecast())Forecast post-shock conditional variances by combining
build_control_xreg())Construct control variables and external regressors for use in forecasting workflows.
Once the package is available on CRAN, install it with
install.packages("postshock")Load the package
library(postshock)The package vignette provides a complete workflow covering
Open the vignette with
vignette("postshock-workflow", package = "postshock")The package also includes the full Technical Report, covering the methods, simulation examples, and COP, IYG, and Apple applications. Open the installed PDF without rerunning any analysis:
report <- system.file("technical_report", "Technical_report.pdf",
package = "postshock", mustWork = TRUE)
utils::browseURL(report)Use help("technical_report", package = "postshock") for
details. The verified PDF and its source files are bundled separately
from the shorter workflow vignette; reading the PDF does not require R
Markdown or LaTeX.
| Function | Description |
|---|---|
dbw() |
Estimate donor balancing weights |
SynthPrediction() |
Donor-adjusted conditional mean forecasting |
SynthPredictionMultiPool() |
Forecasting with structured donor pools |
auto_garchx() |
Automatic GARCH-X model selection |
SynthVolForecast() |
Donor-adjusted conditional variance forecasting |
build_control_xreg() |
Construct control variables and external regressors |
Lin, Y. and Eck, D. J. (2021).
Post-shock forecasting using synthetic controls.
International Journal of Forecasting.
https://doi.org/10.1016/j.ijforecast.2021.03.010
MIT License.