This function runs Ahlgren and Catani's (2016) wild bootstrap (WB) test for error autocorrelation in VAR models. The function uses the test results from the function ACtest for the argument 'test', so that ACtest must be used before running wildBoot.
wildBoot(test, WBtype = c("recursive", "fixed"), B = 199,
WBdist = c("rademacher", "normal", "mammen"),
HCtype = c("LM", "HC0", "HC1", "HC2", "HC3"),
univariate = FALSE, verbose = TRUE)
# S3 method for wildBoot
print(x, ...)
a list of class "wildBoot".
the test argument object.
the WBtype input.
the number of bootstrap simulations.
the distribution used for the wild bootstrap error terms..
the HCtype's used for the WB test.
who ran the function and when.
computation time taken to run the WB test.
how the function wildboot() was called.
number of times the bootstrap simulations gave an error (can happen if one of the matrices becomes computational singular). If this happens, the particular bootstrap sample will be resimulated.
number of times the test from the bootstrap simulations returned NA. If this happens, the particular bootstrap sample will be resimulated.
a B x 5 matrix of the recursive wild bootstrap (if used) Q statistics. Each row is the Q statistics from a bootstrap sample.
the P. values from the recursive design wild bootstrap (if used).
a B x 5 matrix of the fixed wild bootstrap (if used) Q statistics. Each row is the Q statistics from a bootstrap sample.
the P. values from the fixed design wild bootstrap (if used).
a list of the corresponding above items (WBr.Q, WBf.Q, WBr.pv, WBf.pv) for each respective univariate test. The elemtents of the list is named "uni1WBr.Q", "uni2WBr.pv", etc.
An object of class ACtest.
set this to "recursive" for the recursive version of the test, "fixed". for the fixed version, or c("recursive", "fixed") to run both versions.
the number of bootstrap simulations (default is 199).
the distribution used for the wild bootstrap error terms. Either "rademacher", "normal" or "mammen".
a vector of the HCtype's used for the WB test. The types must have been used in the test object.
either FALSE, TRUE, or "only". If TRUE, the test will also be performed univariatly, if "only", only the univariate version will be used. For TRUE and "only", the univariate version must have been used in the test object.
logical; if TRUE, prints progress messages and an estimated completion time during the bootstrap simulation.
Object with class attribute ‘wildBoot’.
further arguments passed to or from other methods.
Ahlgren, N. & Catani, P. (2016). Wild bootstrap tests for autocorrelation in vector autoregressive models. Stat Papers, <doi:10.1007/s00362-016-0744-0>.
ACtest for the test that is required to be run before the wildBoot function.
# \donttest{
fit <- VARfit(y = VodafoneCDS, p = 3, const = TRUE, trend = FALSE)
test <- ACtest(fit = fit, h = 1, HCtype = c("LM", "HC0", "HC1", "HC2", "HC3"))
test
wb <- wildBoot(test = test, WBtype = "recursive", B = 199,
WBdist = "rademacher", HCtype = c("LM", "HC3"))
wb
# }
Run the code above in your browser using DataLab