cptSeqCUSUMerroCheck: Error checking - cptSeqCUSUM

Description Usage Arguments

View source: R/cptSeqCUSUM.R

Description

Performs error checking on arguments given to cptSeqCUSUM

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cptSeqCUSUMerroCheck(
  X = X,
  m = m,
  detector = detector,
  gamma = gamma,
  sigma2 = sigma2,
  critValue = critValue,
  alpha = alpha,
  samples = samples,
  npts = npts,
  Class = Class
)

Arguments

X

time series. Can be a numeric vector or a ts object

m

length of training period

detector

character. Type of changepoint detector to use. Choice of

  • "PageCUSUM": Page's CUSUM detector for 2-sided alternative hypothesis

  • "PageCUSUM1": Page's CUSUM detector for 1-sided alternative hypothesis

  • "CUSUM": Original CUSUM detector for 2-sided alternative hypothesis

  • "CUSUM1": Original CUSUM detector for 1-sided alternative hypothesis

gamma

tuning parameter in the weight function. See details below

sigma2

variance of data in training period. Default is NULL and variance is estimated using var() (assumes independence).

critValue

numeric or character:

  • numeric: This will be used as the critical value. Note this is not the raw threshold.

  • 'Lookup': a pre-simulated critical value is used if available.

  • 'Simulate': a critical value is simulated, dependent on scenario this can be time consuming.

alpha

asymptotic type 1 error rate. Not used if critValue is a numeric.

samples

Only used if critValue='Simulate'. Number of sample of Weiner processes used to calculate critical value.

npts

Only used if critValue='Simulate'. Number of points in each sample of a Weiner process used to calculate critical value.

Class

Logical. Return an object of class cptFor.


grundy95/changepoint.forecast documentation built on Dec. 20, 2021, 1:45 p.m.