cumsum.test: Nonparametric Test for Change-Point with One-change or...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/cumsum.test.R

Description

Compute test statistic based on CUMSUM and change-point estimate

Usage

1
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 "one-change" (default) or "epidemic". You can specify just the initial letter.

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

cumsum

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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")

sac documentation built on Jan. 27, 2021, 5:11 p.m.

Related to cumsum.test in sac...