Pvalues {sac}R Documentation

The p-values of Test Statistics Based on Asymptotic Distribution

Description

Calculate the approximate p-values of the test statistics Tn, Vn and Wn using limit null distributions.

Usage

p.OneChange(n, d, Sn)
p.Epidemic.Vn(Vn, d, tol = 1e-10)
p.Epidemic.Wn(Wn, tol = 1e-07)

Arguments

Sn

test statistic Sn of the one-change alternative

Vn

test statistic Vn of the epidemic alternative

Wn

test statistic Wn of the epidemic alternative

n

sample size

d

dimension of the data value

tol

the desired accuracy.

Value

p.value

p-value

Author(s)

Zhong Guan zguan@iusb.edu

References

Guan, Z.(2001) Some Results About Empirical Likelihood Method, Ph.D. Thesis, The University of Toledo.

Guan, Z.(2004) A semiparametric changepoint model, Biometrika, 91, 4, 849–862.

Guan, Z. Semiparametric Tests for Change-points with Epidemic Alternatives.

See Also

schapt, BootsChapt

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
T<-SemiparChangePoint(x, alternative = "one.change")$Sn
p.OneChange(n, d=1, T)

# epidemic alternative
k<-5
m<-10
n<-20
x<-rnorm(n,0,1)
x[(k+1):m]<-x[(k+1):m]+1.5
res<-SemiparChangePoint(x, alternative = "e")
V<-res$Vn; W<-res$Wn
p.Epidemic.Vn(V, d=1)
p.Epidemic.Wn(W)

[Package sac version 1.0.2 Index]