Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the Kwiatkowski-Phillips-Schmidt-Shin test statistic recursively along subsamples of the original data.
1 2 |
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: |
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 Lopez-de-Lacalle javlacalle@yahoo.es and Ignacio Diaz-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.
1 2 3 4 5 6 7 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.