Learn R Programming

uroot (version 1.4-1)

KPSS.test: Kwiatkowski-Phillips-Schmidt-Shin Test

Description

This function computes the Kwiatkowski-Phillips-Schmidt-Shin test statistic for examining the null hypothesis that a given series is level-stationary, or stationary around a deterministic trend against the alternative that the series is first difference stationary.

Usage

KPSS.test (wts, ltrunc)

Arguments

wts
a univariate time series object.
ltrunc
lag truncation parameter. By default, $3*sqrt(length(wts))/13$

Value

Details

Lag truncation parameter indicates the number of autocovariances considered different from zero for estimating the variance of the residuals. According to the source paper cited below, the lag truncation parameter may be chosen either as $integer[4(T/100)^{1/4}]$ or $integer[12(T/100)^{1/4}]$, as well as l =0.

Rejection of the null hypothesis implies that the long term frequency contains a unit root.

References

D. Kwiatkowski, P.C.B. Phillips, P. Schmidt and Y. Shin (1992), Testing the null hypothesis of stationarity against the alternative of a unit root: How sure are we that economic time series have a unit root? Journal of Econometrics, 54, 159-178.

See Also

KPSS.rectest.

Examples

Run this code
## KPSS test
    data(AirPassengers)
    kpss.out1 <- KPSS.test(wts=AirPassengers, ltrunc=1)
    kpss.out1
    kpss.out2 <- KPSS.test(wts=AirPassengers, ltrunc=2)
    kpss.out2
    kpss.out3 <- KPSS.test(wts=AirPassengers, ltrunc=4)
    kpss.out3

Run the code above in your browser using DataLab