lanzante.test {trend} | R Documentation |
Lanzante's Test for Change Point Detection
Description
Performes a non-parametric test after Lanzante in order to test for a shift in the central tendency of a time series. The null hypothesis, no shift, is tested against the alternative, shift.
Usage
lanzante.test(x, method = c("wilcox.test", "rrod.test"))
Arguments
x |
a vector of class "numeric" or a time series object of class "ts" |
method |
the test method. Defaults to |
Details
Let denote a continuous random variable, then the following model
with a single shift (change-point) can be proposed:
with . The null hypothesis, H:
is tested against the alternative A:
.
First, the data are transformed into increasing ranks and for each time-step the adjusted rank sum is computed:
The probable change point is located at the absolute maximum of the statistic:
.
For method = "wilcox.test"
the Wilcoxon-Mann-Whitney two-sample
test is performed, using to split the series. Otherwise,
the robust rank-order distributional test (
rrod.test
is
performed.
Value
A list with class "htest" and "cptest".
References
Lanzante, J. R. (1996), Resistant, robust and non-parametric techniques for the analysis of climate data: Theory and examples, including applications to historical radiosonde station data, Int. J. Clim., 16, 1197–1226.
See Also
Examples
data(maxau) ; plot(maxau[,"s"])
s.res <- lanzante.test(maxau[,"s"])
n <- s.res$nobs
i <- s.res$estimate
s.1 <- mean(maxau[1:i,"s"])
s.2 <- mean(maxau[(i+1):n,"s"])
s <- ts(c(rep(s.1,i), rep(s.2,(n-i))))
tsp(s) <- tsp(maxau[,"s"])
lines(s, lty=2)
print(s.res)
data(PagesData) ; lanzante.test(PagesData)