Bootstrap a vector according to multiple resampling schemes: resampling, block resampling, Wild bootstrap.
resample_vec(
x,
boot.scheme = c("resample", "resample_block", "wild1", "wild2", "check"),
seed = NULL,
block.size = 2
)
A numeric vector
The type of resampling scheme used, see Details
the seed used, see set.seed
for the resample_block
scheme, the size of the blocks.
This function offers various bootstrap/resampling schemes:
Resampling with replacement
Resampling contiguous observations (blocks) with replacement. Use argument block.size
Wild bootstrap: do not resample, but add a N(0,1) distribution to each value
Wild bootstrap: same, but add instead -1 or 1.