Learn R Programming

eNchange (version 1.1)

boot_thresh: A bootstrap method to calculate the threshold (stopping rule) in the BS or EBS segmentation.

Description

A bootstrap method to calculate the threshold (stopping rule) in the BS or EBS segmentation described in Cho and Korkas (2022) and adapted for irregularly time series in Korkas (2022).

Usage

boot_thresh(
  H,
  q = 0.75,
  r = 100,
  p = 1,
  start.values = c(0.9, 0.6),
  process = "acd",
  do.parallel = 2,
  dampen.factor = "auto",
  epsilon = 1e-05,
  LOG = TRUE,
  acd_p = 0,
  acd_q = 1
)

# S4 method for ANY boot_thresh( H, q = 0.75, r = 100, p = 1, start.values = c(0.9, 0.6), process = "acd", do.parallel = 2, dampen.factor = "auto", epsilon = 1e-05, LOG = TRUE, acd_p = 0, acd_q = 1 )

Value

Returns the threshold C.

Arguments

H

The input irregular time series.

q

The bootstrap distribution quantile. Default is 0.75.

r

The number of bootrstap simulations. Default is 100.

p

The support of the CUSUM statistic. Default is 1.

start.values

Warm starts for the optimizers of the likelihood functions.

process

Choose between acd or hawkes. Default is acd.

do.parallel

Choose the number of cores for parallel computation. If 0 no parallelism is done. Default is 2.

dampen.factor

The dampen factor in the denominator of the residual process. Default is "auto".

epsilon

A parameter added to ensure the boundness of the residual process. Default is 1e-5.

LOG

Take the log of the residual process. Default is TRUE.

acd_p

The p order of the ACD model. Default is 0.

acd_q

The q order of the ACD model. Default is 1.

References

Cho, H. and Korkas, K.K., 2022. High-dimensional GARCH process segmentation with an application to Value-at-Risk. Econometrics and Statistics, 23, pp.187-203.

Examples

Run this code
pw.acd.obj <- new("simACD")
pw.acd.obj@cp.loc <- c(0.25,0.75)
pw.acd.obj@lambda_0 <- c(1,2,1)
pw.acd.obj@alpha <- rep(0.2,3)
pw.acd.obj@beta <- rep(0.7,3)
pw.acd.obj@N <- 3000
pw.acd.obj <- pc_acdsim(pw.acd.obj)
boot_thresh(pw.acd.obj@x,r=20)

Run the code above in your browser using DataLab