cusum_test {memochange} | R Documentation |
Cusum-type test against a change in persistence
Description
This function performs a cusum-type test for a change in persistence as suggested by Leybourne, Taylor, and Kim (2006) and extended by Sibbertsen and Kruse (2009). Under the null hypothesis the time series is nonstationary throughout and under the alternative a change from nonstationary to stationary or vice versa has occured.
Usage
cusum_test(x, trend = c("none", "linear"), tau = 0.2, type = c("LKT",
"SK"), m = 0, simu = 0, M = 10000)
Arguments
x |
the univariate numeric vector to be investigated. Missing values are not allowed. |
trend |
whether the time series exhibits a trend, |
tau |
the function tests in the interval |
type |
which type of cusum test should be performed, |
m |
Number of covariances used for the estimation of the long run variance. Default is |
simu |
whether critical values should be simulated or interpolated, |
M |
number of replications in case critical values should be simulated. Default is |
Details
Leybourne, Taylor, and Kim (2006) introduced a cusum-type test that is able to identify when time series exhibit changes in persistence. Under the null hypothesis, the series is throughout I(1), i.e. nonstationary. Under the alternative the series exhibits a break either from I(0) to I(1) or vice versa. Sibbertsen and Kruse (2009) extended the test such that under the null hypothesis the time series is I(d) throughout, with d>1/2 and under the alternative a change from I(d1) to I(d2), where d1<1/2 and 1/2<d2<3/2, or vice versa has occured. While the test statistic remains the same, the critical values of the extended test change as they depend on the order of integration. Furthermore, the procedure by SK integrates the series if d is estimated to be smaller than 1/2. This allows to overcome the problem of the approach by LKT which is that is has a degenerated limiting distribution when the series is stationary. To determine the order of integration (the memory parameter d) the semiparametric estimator by Geweke and Porter-Hudak (1983) is used.
The critical values of the tests vary with sample size and d. If simu=0
, the critical values provided
are based on linear interpolation of the critical values simulated by Leybourne, Taylor, and Kim (2006) respectively the response curves by Sibbertsen and Kruse (2009).
These are, however, only valid for tau=0.2
and m=0
.
In case that non-default values are chosen for tau
or m
, it is recommended to set simu=1
which means that critical values are simulated based on the given data using M replications.
Caution, for a time series of length T=100
and M=10,000
replications this takes approximately thirty minutes with increasing duration for higher T or M.
It should be noted, however, that M smaller than 10,000 make the results unreliable.
Value
Returns a matrix that consists of test statistic and critical values for testing against a change from nonstationary to stationary, stationary to nonstationary, and against a change in an unknown direction.
Author(s)
Janis Becker
References
Leybourne, S., Kim, T., and Taylor, R. (2007): Cusum of squares-based tests for a change in persistence. Journal of Time Series Analysis, 28, pp. 408-433.
Sibbertsen, P. and Kruse, R. (2009): Testing for a break in persistence under long-range dependencies. Journal of Time Series Analysis, 30, pp. 263-285.
Examples
set.seed(410)
# generate dummy-data
series <- c(rnorm(200), cumsum(rnorm(200)))
# test for a break in persistence
cusum_test(series, trend="none", type="SK")