LKSN_test: DF-type test against a change in persistence

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

View source: R/LKSN_test.R

Description

This function performs the DF-type test against a change in persistence as suggested by Leybourne, Kim, Smith, and Newbold (2003). Under the null hypothesis the time series is I(1) throughout and under the alternative a change from either I(1) to I(0) or I(0) to I(1) has occured.

Usage

1
2
LKSN_test(x, trend = c("none", "linear"), tau = 0.2, lmax = 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, "none" implies no trend and "linear" implies a linear trend.

tau

the function tests in the interval [T*tau,T*(1-tau)] for a break in persistence with T being the length of the time series. It must hold that 0<tau<0.5, default is tau=0.2 as commonly used in the literature. Note that if T*tau<11 the test statistic cannot be calculated.

lmax

Maximum number of lagged differences to be included in the test regression. Default is lmax=0. Note that small sample critical values might differ for lmax>0 so that simulation is recommended in this case.

simu

whether critical values should be simulated or interpolated, simu=1 means simulation, simu=0 means interpolation. See details. Default is simu=0.

M

number of replications in case critical values are simulated. Default is M=10000.

Details

The critical values of the tests vary with the sample size. If simu=0, the critical values provided are based on linear interpolation of the critical values simulated by Leybourne, Kim, Smith, and Newbold (2003). These are, however, only valid for tau=0.2 and lmax=0. In case that non-default values are chosen for tau or lmax, 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 (corresponding to alpha=0.1,0.05) for testing against a change from I(1) to I(0), I(0) to I(1), and against a change in an unknown direction.

Author(s)

Janis Becker

References

Leybourne, S., Kim, T., Smith, V., and Newbold, P. (2003): Tests for a change in persistence against the null of difference-stationarity. Econometrics Journal, 6, pp. 291-311.

See Also

cusum_test, LBI_test, MR_test, ratio_test.

Examples

1
2
3
4
5
6
7
set.seed(410)

# generate dummy-data
series <- c(rnorm(200), cumsum(rnorm(200)))

# test for a break in persistence
LKSN_test(series, trend="none")

memochange documentation built on July 27, 2020, 1:09 a.m.