indicates the null hypothesis and must be one of
"Level" (default) or "Trend". You can specify just
the initial letter.
lshort
a logical indicating whether the short or long version
of the truncation lag parameter is used.
Value
A list with class "htest" containing the following components:
statisticthe value of the test statistic.
parameterthe truncation lag parameter.
p.valuethe p-value of the test.
methoda character string indicating what type of test was
performed.
data.namea character string giving the name of the data.
Details
To estimate sigma^2 the Newey-West estimator is used.
If lshort is TRUE, then the truncation lag parameter is
set to trunc(3*sqrt(n)/13), otherwise
trunc(10*sqrt(n)/14) is used. The p-values are interpolated
from Table 1 of Kwiatkowski et al. (1992). If the computed statistic
is outside the table of critical values, then a warning message is
generated.
Missing values are not handled.
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.
Journal of Econometrics54, 159--178.
x <- rnorm(1000) # is level stationarykpss.test(x)
y <- cumsum(x) # has unit rootkpss.test(y)
x <- 0.3*(1:1000)+rnorm(1000) # is trend stationarykpss.test(x, null = "Trend")