SBQ.mon.infinite: Stacked backward CUSUM monitoring with infinite horizon

View source: R/detectors_monitoring.R

SBQ.mon.infiniteR Documentation

Stacked backward CUSUM monitoring with infinite horizon

Description

Performs the infinite horizon multivariate stacked backward CUSUM monitoring procedure with linear boundary

Usage

SBQ.mon.infinite(
  formula,
  T,
  alternative = c("two.sided", "greater", "less"),
  H = NULL
)

Arguments

formula

Specification of the linear regression model by an object of the class "formula"

T

Length of the training sample. Monitoring starts at T+1.

alternative

A character string specifying the alternative hypothesis; must be one of "two.sided" (default), "greater" or "less". The output detector is the maximum norm of Q_t ("two.sided"), the maximum entry of Q_t ("greater"), or maximum entry of -Q_t ("less"), respectively.

H

An optional matrix for the partial hypothesis H'β_t = H'β_0, where H'Q_t is considered instead of Q_t. H must have orthonormal columns. For a test for a break in the intercept, H can also set to the string "intercept". The full structural break test is considered as the default setting (NULL).

Value

A list containing the following components:

detector.scaled

A vector containing the path of the detector statistic scaled by the boundary function from T+1 onwards depending on the specificaton for the alternative hypothesis

detector.array

A matrix containing the triangular array of the stacked backward cusum detector from T+1 onwards

boundary

A matrix containing the values of the triangular boundary surface from T+1 onwards

statistic

The test statistic; maximum of detector.scaled

detectontime

The vector containing the detection time points for different significance levels, which are the time indices of the first boundary crossing; NA if the null hypothesis is not rejected

alternative

The specification for the alternative hypothesis

critical.value

A vector containing critical values for different significance levels; NA if critical value for this specification is not implemented

rejection

A logical vector containing the test decision for different significance levels; TRUE for rejection; NA if critical value is not implemented

Examples

T <- 100
t <- 5*T
u <- rnorm(t,0,1)
x <- rnorm(t,1,2)
y <- c(rep(0,480), rep(5,20)) + x + I(x^2) + u
SBQ.mon.infinite(y~1+x+I(x^2), T)
SBQ.mon.infinite(y~1+x+I(x^2), T, alternative = "greater")
H <- matrix(c(1,0,0), ncol = 1)
SBQ.mon.infinite(y~1+x+I(x^2), T, H = H)

ottosven/backCUSUM documentation built on April 12, 2022, 10:59 p.m.