ratio_test: Ratio-based test against a change in persistence

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

View source: R/ratio_test.R

Description

This function performs a ratio-based test against a change in persistence. 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.

Usage

1
2
3
ratio_test(x, trend = c("none", "linear"), tau = 0.2,
  statistic = c("mean", "max", "exp"), type = c("BT", "LT", "HLT",
  "HLTmin"), m = 0, z = 9, 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 type="BT" or type="HLT" and T*tau<= 1 + as.numeric(trend=="linear"), type="LT" and T*tau<=1+ as.numeric(trend=="linear") + (m>3)*(m-3), or type="HLT" and T*tau<=(z+1) the test statistic cannot be calculated.

statistic

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

type

which type of ratio test should be performed, "BT" for the standard ratio test by Busetti and Taylor (2004), "LT" for the modified ratio test by Leybourne and Taylor (2004), and "HLT"" respectively "HLTmin" are the modified tests by Harvey, Leybourne, and Taylor (2006). See details.

m

Number of covariances used for the estimation of the long run variance if statistic=LT is used. Default is m=0.

z

Number of polynomials used if "HLT" or "HLTmin" are considered. Default is z=9.

simu

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

M

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

Details

Busetti and Taylor (2004) (BT) introduced a test that is able to identify when time series exhibit changes in persistence. Under the null hypothesis, the series is constant I(0), i.e. stationary. Under the alternative the series exhibits a break either from I(0) to I(1) or I(1) to I(0). As the test is oversized for weakly dependent time series, Leybourne and Taylor (2004) (LT) standardized the test statistic by an estimate of the long run variance using m lags. Another problem is that constant I(1) processes are neither covered under the null nor the alternative. Here, the test often rejects the null although no change in persistence occured. Harvey, Leybourne, and Taylor (2006) (HLT) introduced a modification where they multiply the test statistic by a unit root test. This allows the test statistic to have the same critical values under both constant I(0) and constant I(1). It should be noted, however, that only the critical values are identical, the distribution is highly irregular.

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 Harvey, Leybourne, and Taylor (2006). These are, however, only valid for tau=0.2, m=0, and z=9. In case that non-default values are chosen for tau, m, or z, 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 fifteen 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,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.

Author(s)

Janis Becker

References

Busetti, F. and Taylor, R. (2004): Tests of stationarity against a change in persistence. Journal of Econometrics, 123, pp. 33-66.

Leybourne, S. and Taylor, R. (2004): On tests for changes in persistence. Economics letters, 84, pp. 107-115.

Harvey, D., Leybourne, S. and Taylor, R. (2006): Modified tests for a change in persistence. Journal of Econometrics, 134, pp. 441-469.

See Also

cusum_test, LBI_test, LKSN_test, MR_test.

Examples

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

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

# test for a break in persistence
ratio_test(series)

Example output

                                     90%  95%  99% Teststatistic
Against change from I(0) to I(1)    3.51 4.58 7.56     133.83184
Against change from I(1) to I(0)    3.54 4.68 7.82       1.32645
Against change in unknown direction 4.62 5.85 9.21     133.83184

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