best.block.sub.size {boodd} | R Documentation |
Optimal Block Subsampling Size
Description
This function determines the optimal block size for subsampling using a distance-based method. It applies the Circular Block method and calculates Kolmogorov distances to select the most suitable subsampling size.
Usage
best.block.sub.size(X, func, PLT = TRUE, qq = 0.75, ...)
Arguments
X |
A numeric vector or time series data. |
func |
A function applied to the blocks. |
PLT |
Logical. If |
qq |
A numeric value in the interval |
... |
Optional additional arguments passed to the |
Details
The procedure relies on the method proposed by Bickel and Sakov (2008)
for determining optimal subsampling sizes. It computes a range of subsampling
distributions for sizes proportional to powers of qq
. The function
then evaluates the Kolmogorov distance between consecutive subsampling
distributions to identify the optimal block size.
The function uses the Circular Block Bootstrap for generating subsamples.
Ensure that qq
is set such that \lfloor-\log(length(X))/\log(qq)\rfloor \leq 3
;
otherwise, the function will return an error.
Value
Returns the optimal block size for subsampling.
If PLT = TRUE
, a plot of Kolmogorov distances between consecutive subsampling distributions
versus subsampling sizes is also displayed.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Bickel, P., and Sakov, A. (2008). On the choice of m in the m out of n bootstrap and confidence bounds for extrema. Statistica Sinica, 18 967–985.
See Also
block.sub
,
rate.sub
,
rate.block.sub
.
Examples
set.seed(12345)
n = 1000 # sample size
# generating an AR(1) Gaussian process with variance 1
ts = arima.sim(n=n,model=list(ar=c(0.4)))*sqrt(1-0.4^2)
bopt1=best.block.sub.size(ts,mean)