cumsum.test {sac} | R Documentation |
Nonparametric Test for Change-Point with One-change or Epidemic Alternative
Description
Compute test statistic based on CUMSUM and change-point estimate
Usage
cumsum.test(x, alternative = c("one.change", "epidemic"))
Arguments
x |
a numeric vector or matrix containing the data, one row per observation; |
alternative |
a character string specifying the alternative hypothesis,
must be one of |
Value
Sn |
test statistic |
k.hat |
estimated change-point |
m.hat |
the second estimated change-point for epidemic alternative |
Author(s)
Zhong Guan zguan@iusb.edu
References
Csorgo, M. and Horvath, L. (1997), Limit Theorems in Change-Point Analysis, New York: John Wiley
See Also
Examples
require(sac) #load the package
# one-change alternative
k<-10
n<-30
x<-rnorm(n,0,1)
x[(k+1):n]<-x[(k+1):n]+1.5
cumsum.test(x, alternative = "one.change")
# epidemic alternative
k<-10
m<-20
n<-30
x<-rnorm(n,0,1)
x[(k+1):m]<-x[(k+1):m]+1.5
cumsum.test(x, alternative = "epidemic")
[Package sac version 1.0.2 Index]