KPSS.test {uroot} | R Documentation |
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.
KPSS.test (wts, ltrunc)
wts |
a univariate time series object. |
ltrunc |
lag truncation parameter. By default, 3*sqrt(length(wts))/13 |
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.
An object of class kpssstat-class
.
Javier López-de-Lacalle javlacalle@yahoo.es and Ignacio Díaz-Emparanza Ignacio.Diaz-Emparanza@ehu.es.
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.
## 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