cptForecastErrorCheck: Error checking - cptForecast

Description Usage Arguments

View source: R/cptForecast.R

Description

Performs error checking on the arguments passed to cptForecast

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

Arguments

errors

numeric vector. Forecast errors to perform changepoint analysis upon.

m

numeric. Length of training period where forecast errors are assumed stable.

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.

See details below.

forecastErrorType

character. Type of changes to look for. Choice of

  • "Both": Analysis is performed on both the raw and squared forecast errors,

  • "Raw": Analysis is only performed on the raw forecast errors. Only first order changes are reliably detected.

  • "Squared:" Analysis is only performed on the centred squared forecast errors.

See details below.

gamma

numeric. Tuning parameter used in detector. See details below.

critValue

character or numeric. Critical value of normalized asymptotic distribution of chosen detector under no change. Choice of

  • "Lookup": Pre-simulated critical value is used if available

  • "Simulate": Critical value is simulated. Note this can be time consuming in certain scenarios

  • numeric: Specified critical value to be used

See details below

alpha

Type-1 error

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.


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