KPSS.rectest {uroot} | R Documentation |
This function computes the Kwiatkowski-Phillips-Schmidt-Shin test statistic recursively along subsamples of the original data.
KPSS.rectest (wts, type="moving", nsub=48, ltrunc, trace=list(remain=1, plot=0, elaps=1))
wts |
a univariate time series object. |
type |
a character string indicating how subsamples are selected. See details. |
nsub |
the number of observations in each subsample. |
ltrunc |
lag truncation parameter. By default, 3*sqrt(length(wts))/13 |
trace |
a list object indicating if a trace of the iteration progress should be printed. Three
levels of information can be printed: remain , the percentage of the whole procedure that has
been completed; plot , a plot of the computed statistics; and elaps , how much time the
whole procedure has consumed. |
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.
Three types of subsamples are considered: "backw", the statistic is computed for the last nsub
observations and then one year backwards is added until the beginning of the sample; "forw", the
statistic is computed for the first nsub
observations and then one year forwards is added until
the end of the sample; "moving", the statistic is computed over moving subsamples of length nsub
.
An object of class kpssrecst-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 recursive test data(AirPassengers) kpss.out <- KPSS.rectest(wts=AirPassengers, type="backw", nsub=48, ltrunc=2, trace=list(remain=1, plot=0, elaps=1)) show(kpss.out) plot(kpss.out)