KPSS.test {VGAMextra}R Documentation

KPSS tests for stationarity

Description

The Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test for the null hypothesis that the series x is level or trend stationary

Usage

           KPSS.test(x, type.H0 = c("level", "trend")[1],
                        trunc.l = c("short", "large")[1],
                        show.output = TRUE)

Arguments

x

Numeric. A univariate series.

type.H0

The null hypothesis to be tested: either level or trend stationarity.

trunc.l

The lag truncation parameter. See below for more details.

show.output

Logical. Should the results be displyed? Default is TRUE.

Details

To test the null hypothesis that a univariate time series is level–stationary or stationary around a deterministic trend. The alternative states the existence of a unit root.

Under this methodology, the series, say \{ y_t;~t = 1, \ldots, T\} is assumed to be decomposed as

y_t = \rho t + \xi_t + \varepsilon_t,

that is, as the sum of a deterministic trend, a random walk (\xi_t), and a stationary error (\varepsilon_t \sim N(0, \sigma^2_z). Hence, this test reduces to simply test the hypothesis that \{ \xi_t \} is stationary, that is, H_0: \sigma^2_z = 0.

The test statistic combines the one–sided Lagrange multiplier (LM) statistic and the locally best invariant (LBI) test statistic (Nabeya and Tanaka, (1988)). Its asymptotic distribution is discussed in Kwiatkowski et al. (1992), and depends on the ‘long–run’ variance \sigma^2. The test statistic is given by

\eta = T^{-2} \sum_i S^2_i / \widehat{\sigma}^2= T^{-2} \sum_i S^2_i / s^2(l).

where s^2(l) is a consistent estimate of \sigma^2, given by

s^2(l) = (1/T)\sum_{t = 1}^T\varepsilon^2_t + (2 / T) \sum_{s = 1}^l w(s, l) \sum_{t = s + 1}^T \varepsilon_t \varepsilon_{t - s}.

Here, w(s, l) = 1 - s/(l + 1), where l is taken from trunc.l, the lag–truncation parameter. The choice "short" gives the smallest integer not less than 3 \sqrt{T} / 11, or else, 9 \sqrt{T} / 11, if trunc.l = "large".

Note, here the errors, \varepsilon_t, are estimated from the regression x ~ 1 (level) or x ~ 1 + t (trend), depending upon the argument type.H0.

Unlike other software using linear interpolates, here the p–values for both, trend and level stationarity, are interpolated by cubic spline interpolations from the tail critical values given in Table 1 in Kwiatkowski et al. (1992). The interpolation takes place on \eta.

Value

A list with the following:

1) Test statistic and P-value,

2) Critical values,

3) Residuals, \varepsilon_t.

Note

There is no standard methodology to select an appropriate value for trunc.l, however, satisfactory results have been found for trunc.l proportional to T^{1/2}. See Andrews, D.W.K. (1991) for a discussion on this. Empirically, this parameter may be suggested by the problem in turn, and should be large enough to approximate the true dynamic behaviour of the series.

Author(s)

Victor Miranda.

References

Andrews, D.W.K. (1991) Heteroskedasticiy and autocorrelation consistent covariance matrix estimation. Econometrica, 59, 817–858.

Kwiatkowski, D., Phillips, P.C.B., Schmidt, P., and Shin, Y. (1992) Testing the null hypothesis of stationarity against the alternative of a unit root. Journal of Econometrics, 54, 159–178.

Nabeya, S. and Tanaka, K. (1988) Asymptotic theory of a test for the constancy regression coefficients against the random walk alternative. Annals of Statistics, 16, 218–235.

Phillips, P.C.B. and Perron, P. (1988) Testing for a unit root in time series regression. Biometrika, 75, 335–346.

Phillips, P.C.B. (1987) Time series with unit roots. Econometrica, 55, 277–301

See Also

checkTS.VGAMextra.

Examples

set.seed(2802)
test <- KPSS.test(rnorm(20), type.H0 = "trend")
class(test)

test$crit.value

[Package VGAMextra version 0.0-6 Index]