simCritVal: Simulate Critical Value

Description Usage Arguments Value Examples

View source: R/simCritVal.R

Description

Simulates a critical value from the asymptotic distribution of the chosen CUSUM detector under the no change scenario.

Usage

1
2
3
4
5
6
7
8
simCritVal(
  samples = 1000,
  alpha = 0.05,
  detector = "PageCUSUM",
  gamma = 0,
  npts = 500,
  progressBar = TRUE
)

Arguments

samples

Number of samples to simulate from asymptotic distribution

alpha

Type 1 error

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

npts

Number of points in discretization of Weiner process

progressBar

Logical. Show progress bar

Value

numeric critical value

Examples

1
ans = simCritVal(samples=100, npts=20)

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