andrews_test: Univariate Andrews Test for End-of-Sample Structural Change

Description Usage Arguments Value References Examples

Description

This implements Andrews' test for end-of-sample change, as described by \insertCiteandrews03;textualCPAT. This test was derived for detecting a change in univariate data. See \insertCiteandrews03CPAT for a description of the test.

Usage

1
andrews_test(x, M, pval = TRUE, stat = TRUE)

Arguments

x

Vector of the data to test

M

Numeric index of the location of the first potential change point

pval

If TRUE, return a p-value

stat

If TRUE, return a test statistic

Value

If both pval and stat are TRUE, a list containing both; otherwise, a number for one or the other, depending on which is TRUE

References

\insertAllCited

Examples

1
CPAT:::andrews_test(rnorm(1000), M = 900)

CPAT documentation built on May 1, 2019, 6:51 p.m.

Related to andrews_test in CPAT...