Identify the main shock by targetting the forecast error variance contribution in the frequency domain.
bootstrap.Rd
Identify the main shock by targetting the forecast error variance contribution in the frequency domain.
Usage
bootstrap(
var,
id_method = NULL,
nboot = 500,
n_ahead = 20,
design = "recursive",
method = "resample",
wild_distr = "gaussian",
bias_adjust = FALSE,
lower_pctl = 0.16,
upper_pctl = 0.84,
...
)
Arguments
- var
VAR to bootstrap
- id_method
function that identifies the Structural VAR
- nboot
number of bootstrap iteratons
- n_ahead
length of IRF horizon
- design
"recursive" or "fixed". Controls how samples of the data are constructed.
- method
"resample" or "wild"
- wild_distr
distribution used for "wild" boostrap method. Either "gaussian", "rademacher", or "mammen".
- bias_adjust
Boolean. Set to TRUE to calculate the bias and run the bootstrap again.
- lower_pctl
lower percentile of bootstraps returned in summary. Defaults to 0.16 (for 68% CI).
- upper_pctl
upper percentile of bootstraps returned in summary. Defaults to 0.84 (for 68% CI).
- ...
Additional arguments passed to the function passed to id_method
Examples
x <- svars::USA
v <- vars::VAR(x, p = 2)
mvar <- id_fevdtd(v, "pi", 4:10)
bmvar <- bootstrap(mvar, id_fevdtd, target = "pi", horizon = 4:10)
#> [ -------------------- ]
[ =------------------- ]
[ ==------------------ ]
[ ===----------------- ]
[ ====---------------- ]
[ =====--------------- ]
[ ======-------------- ]
[ =======------------- ]
[ ========------------ ]
[ =========----------- ]
[ ==========---------- ]
[ ===========--------- ]
[ ============-------- ]
[ =============------- ]
[ ==============------ ]
[ ===============----- ]
[ ================---- ]
[ =================--- ]
[ ==================-- ]
[ ===================- ]
[ ==================== ]