View source: R/statistical_tests.R
| mbb_resample_data | R Documentation |
Generates a bootstrap resample of a time series matrix using the Moving Block Bootstrap (MBB) method of Kunsch (1989).
mbb_resample_data(data_series, block_length)
data_series |
|
block_length |
|
Resamples overlapping blocks of block_length consecutive rows with replacement,
then concatenates them to produce a bootstrap sample of the same length P as
the original series. This preserves the short-run autocorrelation structure of the data,
which is required for valid inference in the Reality Check and SPA-type tests.
matrix of bootstrap resampled data with the same dimensions
as data_series.
Kunsch, H. R. (1989). The jackknife and the bootstrap for general stationary observations. The Annals of Statistics, 17(3), 1217–1241. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/aos/1176347265")}
Politis, D. N., & Romano, J. P. (1994). The stationary bootstrap. Journal of the American Statistical Association, 89(428), 1303–1313. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.1994.10476870")}
Corradi, V., & Swanson, N. R. (2011). The White Reality Check and some of its recent extensions. In Festschrift in honor of Halbert L. White.
Liu, R. Y., & Singh, K. (1992). Moving blocks jackknife and bootstrap capture weak dependence. In R. LePage & L. Billard (Eds.), Exploring the Limits of Bootstrap (pp. 225–248). Wiley.
data(metals)
# metals: 165 x 15; columns 1-3 are the first three competing forecasts
mbb_resample_data(metals[, 1:3], block_length = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.