Andrews.test {CPAT}  R Documentation 
Andrews' Test for EndofSample Structural Change
Description
Performs Andrews' test for endofsample structural change, as described in
(Andrews 2003). This function works for both univariate and
multivariate data depending on the nature of x
and whether
formula
is specified. This function is thus an interface to
andrews_test
and andrews_test_reg
; see the
documentation of those functions for more details.
Usage
Andrews.test(x, M, formula = NULL)
Arguments
x 
Data to test for change in mean (either a vector or

M 
Numeric index of the location of the first potential change point 
formula 
The regression formula, which will be passed to

Value
A htest
class object containing the results of the test
References
Andrews DWK (2003). “EndofSample Instability Tests.” Econometrica, 71(6), 1661–1694. ISSN 00129682, 14680262, https://www.jstor.org/stable/1555535.
Examples
Andrews.test(rnorm(1000), M = 900)
x < rnorm(1000)
y < 1 + 2 * x + rnorm(1000)
df < data.frame(x, y)
Andrews.test(df, y ~ x, M = 900)
[Package CPAT version 0.1.0 Index]