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 x.

PLT

Logical. If TRUE the function plots the Mean Square Error (MSE) of the bootstrap variance estimator for various block lengths. By default it is equal to FALSE.

parameter

The possible bopt_circy parameters are:

  • "mean",

  • "seasonal mean".

method

A choice of the block bootstrap method:

  • "GSBB" - Generalized Seasonal Block Bootstrap,

  • "CGSBB" - Circular version of GSBB,

  • "EMBB" - Extension of Moving Block Bootstrap,

  • "CEMBB" - Circular version of EMBB.

plot_range

If PLT=TRUE, a parameter changing the range of the x-axis in the plot of MSE. By default plot_range = 10.

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)

[Package boodd version 0.1 Index]