bopt_circy {boodd} | R Documentation |
Optimal Bootstrap Block Length for Periodically Correlated Time Series.
Description
Calculates the optimal block length for Generalized Seasonal Block Bootstrap (GSBB), Extension of Moving Block Bootstrap (EMBB), and their circular versions CGSBB and CEMBB for periodically correlated time series, in the problems of the overall mean and seasonal means estimation.
Usage
bopt_circy(
x,
period,
PLT = FALSE,
parameter = c("mean", "seasonal mean"),
method = c("EMBB", "CEMBB", "GSBB", "CGSBB"),
plot_range = NULL
)
Arguments
x |
A numeric vector representing a periodically correlated time series. |
period |
An integer; period length of |
PLT |
Logical. If |
parameter |
The possible bopt_circy parameters are:
|
method |
A choice of the block bootstrap method:
|
plot_range |
If |
Details
For each bootstrap method implemented here,
the function bopt_circy
computes the optimal block length
for periodically correlated (PC) time series.
The optimal block length is obtained by minimization of the
MSE of the bootstrap variance estimator (see Bertail and Dudek (2024)).
For the GSBB
and CGSBB
the optimal block length has the form
k\cdot d \pm 1
, where d
is a period length and k
is a positive
integer. For the EMBB
and CEMBB
the optimal block length can be of any length.
Value
Returns the optimal block length (integer) for the chosen block bootstrap method.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Bertail, P. and Dudek, A.E. (2024). Optimal choice of bootstrap block length for periodically correlated time series, Bernoulli, 30, 2521-2545.
See Also
blockboot.seasonal
, embb.sample
.
Examples
# Generate a periodically correlated time series
n=200
b <- arima.sim(n = n, model = list(ar = c(0.5, 0.4), na = 0.5))
period <- 12
x <- 5*cos(2 * pi /period * (1:n))+5*b * cos(2 * pi /period * (1:n))
# Calculate the optimal block length for GSBB
optimal_choice <- bopt_circy(x, period, parameter= "mean", method= "GSBB")
print(optimal_choice)