x
has a unit root against a stationary alternative.
PP.test(x, lshort = TRUE)
"htest"
containing the following components:
sigma^2
the Newey-West estimator is used. If lshort
is TRUE
, then the truncation lag parameter is set to
trunc(4*(n/100)^0.25)
, otherwise
trunc(12*(n/100)^0.25)
is used. The p-values are
interpolated from Table 4.2, page 103 of Banerjee et al
(1993).Missing values are not handled.
P. Perron (1988) Trends and random walks in macroeconomic time series. Journal of Economic Dynamics and Control 12, 297--332.
x <- rnorm(1000)
PP.test(x)
y <- cumsum(x) # has unit root
PP.test(y)
Run the code above in your browser using DataLab