SemiparChangePoint {sac}R Documentation

Semiparametric Test of Change-point(s) with One-change or Epidemic Alternative

Description

Calculate test statistics, loglikelihood function and estimate unknown parameters in the semiparametric model.

Usage

SemiparChangePoint(x, alternative = c("one.change", "epidemic"), 
    adj.Wn = FALSE, tol = 1e-07, maxit = 50, trace = FALSE, ...)

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.

tol

the desired accuracy (convergence tolerance), an argument of glm.control.

adj.Wn

logical indicating if Wn should be adjusted or not for "epidemic" alternative.

maxit

the maximum number of iterations, an argument of glm.control.

trace

logical indicating if output should be produced for each iteration, an argument of glm.control.

...

other future arguments

Details

Model: \log\{ g(x)/f(x)\}=\exp\{\alpha+\beta'T(x)\} , where f(x) and g(x) are the density (frequency) functions of the two hypothesized populations, and T(x) can be chosen as T(x)=x or T(x)=(x,x^2). The procedure will fail when there is separation in the data in the sense of Albert \& Anderson(1984, Biometrika) and Santner \& Duffy (1986, Biometrika). In this case, the change-point(s) may be detected easily using nonparametric method based on cumsum. Currently, this function does not check whether the data are separated.

Value

k.hat

change-point estimate

m.hat

second change-point estimate for "epidemic" alternative

ll

loglikelihood function

Sn

likelihood ratio test statistic for "one-change" alternative

Vn

test statistic based integal of weighted likelihood ratio for "epidemic" alternative

Wn

test statistic based supremum of weighted likelihood ratio for "epidemic" alternative

alpha.hat

estimate of \alpha

beta.hat

estimate of \beta

Note

Statistic Wn need be adjusted only for one dimensional observations and if no bootstrap test is conducted.

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 change-point model, Biometrika, 91, 4, 849–862.

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

See Also

schapt, p.OneChange, p.Epidemic.Vn, p.Epidemic.Wn

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
SemiparChangePoint(x, alternative = "one.change")

# epidemic alternative
k<-5
m<-10
n<-20
x<-rnorm(n,0,1)
x[(k+1):m]<-x[(k+1):m]+1.5
SemiparChangePoint(x,  alternative = "epidemic")

[Package sac version 1.0.2 Index]