This function performs the locally best invariant test against a change in persistence as suggested by Busetti and Taylor (2004). Under the null hypothesis the time series is I(0) throughout and under the alternative a change from either I(1) to I(0) or I(0) to I(1) has occured.
LBI_test(x, trend = c("none", "linear"), tau = 0.2,
statistic = c("mean", "max", "exp"), simu = 0, M = 10000)
Returns a matrix that consists of test statistic and critical values (corresponding to alpha=0.1,0.05,0.01
) for testing against a change from I(1) to I(0), I(0) to I(1), and against a change in an unknown direction.
the univariate numeric vector to be investigated. Missing values are not allowed.
whether the time series exhibits a trend, "none"
implies no trend and "linear"
implies a linear trend.
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<=1+as.numeric(trend=="linear")
the test statistic cannot be calculated.
which type of test statistic should be used, "mean"
corresponds to Hansen's (1991) mean score, "max"
to Andrews' (1993) maximum statistic, and "exp"
to Andrews and Ploberger's (1994) mean-exponential statistic.
whether critical values should be simulated or interpolated, simu=1
means simulation, simu=0
means interpolation. See details. Default is simu=0
.
number of replications in case critical values should be simulated. Default is M=10000
.
Janis Becker
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 Busetti and Taylor (2004). These are, however, only valid for tau=0.2
.
In case that another value is chosen for tau
, it is recommended to set simu=1
which means that critical values are simulated based on the given data using M replications.
For a time series of length T=100
and M=10,000
replications this takes approximately five minutes with increasing duration for higher T or M.
It should be noted, however, that M smaller than 10,000 make the results unreliable.
Busetti, F. and Taylor, R. (2004): Tests of stationarity against a change in persistence. Journal of Econometrics, 123, pp. 33-66.
cusum_test
, LKSN_test
, MR_test
, ratio_test
.
set.seed(410)
# generate dummy-data
series <- c(rnorm(100), cumsum(rnorm(100)))
# test for a break in persistence
LBI_test(series, trend="none", statistic="mean")
Run the code above in your browser using DataLab