SBQ.test: Stacked backward CUSUM R-test (retrospective)

View source: R/detectors_retrospective.R

SBQ.testR Documentation

Stacked backward CUSUM R-test (retrospective)

Description

Performs the multivariate stacked backward CUSUM R-test (retrospective) with linear boundary

Usage

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

Arguments

formula

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

alternative

A character string specifying the alternative hypothesis; must be one of "two.sided" (default), "greater" or "less". The output detector matrix are the maximum norms of SBQ_{s,t} ("two.sided"), the maximum entries of SBQ_{s,t}("greater"), or maximum entries of -SBQ_{s,t} ("less"), respectively.

H

An optional matrix for the partial hypothesis H'β_t = H'β_0, where H'BQ_t is considered instead of SBQ_{s,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.array

A matrix containing the triangular array of the stacked backward cusum detector depending on the specificaton for the alternative hypothesis

boundary

The matrix containing the values of the triangular boundary surface

detector.scaled

A vector containing the path of the sequential stacked backward cusum detector divided by the boundary

statistic

The test statistic; maximum of detector.scaled

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
u <- rnorm(T,0,1)
x <- rnorm(T,1,2)
y <- c(rep(0,T/2), rep(0.7,T/2)) + x + I(x^2) + u
SBQ.test(y~1+x+I(x^2))
SBQ.test(y~1+x+I(x^2), alternative = "greater")
H <- matrix(c(1,0,0), ncol = 1)
SBQ.test(y~1+x+I(x^2), H = H)

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