block.sub {boodd} | R Documentation |
Block Subsampling
Description
Block Subsampling for Time Series Using Blocks of Observations.
Usage
block.sub(x, func, length.block, method = c("movingblock", "circular"), ...)
Arguments
x |
A numeric vector or time series data. |
func |
The function to apply to each block. |
length.block |
A scalar or a vector indicating the lengths of the blocks. |
method |
A character string specifying the type of block subsampling method.
Can be
|
... |
Optional additional arguments for the |
Details
This function performs block subsampling on time series data using
the Moving or Circular Blocks methods (see Politis et al., 1999).
It applies the specified function func
to each subsample block whose
length are defined by length.block
.
The function func
is applied to the vector x
and may return either a real number or
a vector.
Value
A matrix containing, in rows, the value of func
applied to
each block. The number of columns in the matrix is equal to the length
of the output of the func
function.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Politis, D. N., Romano, J. P., & Wolf, M. (1999). Subsampling. Springer N.Y..
See Also
best.block.sub.size
, rate.block.sub
.
Examples
set.seed(123)
data <- rnorm(100)
result <- block.sub(data, mean, length.block = 5, method="movingblock")