blockwise_bootstrap: Block-wise bootstrap

Description Usage Arguments Details References See Also Examples

View source: R/ts_bootstrap.R

Description

Procedure for evaluating a statistic on a stationary time series.

Usage

1
2
blockwise_bootstrap(series, statistic, B, l, sim.length = NROW(series),
  ...)

Arguments

series

A stationary time series from which the block-wise sampling will be done. Can be univariate or multivariate.

statistic

Function: the statistic for which a bootstrap-distribution will be created.

B

Amount of bootstrap samples. Choice depends on statistic and purpose

l

Length of blocks in the procedure. Good values depend on the series and the statistic, however, good default values ... n^(1/3) (ref Künsch) or 2n^(1/3) ref (Bühlmann).

sim.length

Length of the sampled series. Will usually be the same length as the original series, but can in some cases (such as residual bootstrapping) be useful to be set to another value.

...

Additional values passed on to the statistic function.

Details

Returns a bootstrap distribution of the chosen statistic.

The implementation follows the block-wise bootstrap method as presented by Künsch (1989). Resamples blocks of the time series and uses these to create new time series, which the statistic is evaluated on. Can for example be used to estimate the variance or confidence intervals of a statistic (e.g. mean of the series).

Note that the implemented method is not the 'block of blocks'-bootstrap but the more general 'naive' block-wise bootstrap method.

References

Kunsch, Hans R. (1989) "The Jackknife and the Bootstrap for General Stationary Observations". The Annals of Statistics, 17(3), 1217–1241.

See Also

ARsieve_bootstrap

Examples

1
2
3
series <- arima.sim(model=list(ar=c(0.6, -0.4)), n=100)
bw.res <- blockwise_bootstrap(series, mean, B=500, l=5)
boxplot(bw.res)

rwigren/TSAutils documentation built on Nov. 5, 2019, 5:10 a.m.