x has a unit root.
pp.test(x, alternative = c("stationary", "explosive"), type = c("Z(alpha)", "Z(t_alpha)"), lshort = TRUE)"stationary" (default) or "explosive". You can
specify just the initial letter."Z(alpha)" (default) or "Z(t_alpha)"."htest" containing the following components:Z(alpha) or Z(t_alpha)
statistic for a first order autoregressive coefficient equals one are
computed. To estimate 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.1 and 4.2, p. 103 of Banerjee et al. (1993). If the
computed statistic is outside the table of critical values, then a
warning message is generated.
Missing values are not handled.
adf.test
x <- rnorm(1000) # no unit-root
pp.test(x)
y <- cumsum(x) # has unit root
pp.test(y)
Run the code above in your browser using DataLab