uroot.test | R Documentation |
Perform a unit root test to check stationary in a linear stochastic process.
uroot.test(y, unit_root = c("adf","kpss","pp","box"), alpha = 0.05)
y |
a numeric vector or an object of the |
unit_root |
A character string naming the desired unit root test for checking stationary.
Valid values are |
alpha |
Level of the test, possible values range from 0.01 to 0.1. By default |
Several different tests are available:
In the kpss
test, the null hypothesis that y
has a stationary root
against a unit-root alternative. In the two remaining tests, the null hypothesis
is that y
has a unit root against a stationary root alternative. By default,
alpha = 0.05
is used to select the more likely hypothesis.
A list with class "h.test"
containing the following components:
statistic: |
the test statistic. |
parameter: |
the test degrees freedoms. |
p.value: |
the p-value for the test. |
alternative: |
a character string describing the alternative hypothesis. |
method: |
a character string with the test name. |
data.name: |
a character string giving the name of the data. |
Asael Alonzo Matamoros and A. Trapletti.
Dickey, D. & Fuller, W. (1979). Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association. 74, 427-431.
Kwiatkowski, D., Phillips, P., Schmidt, P. & Shin, Y. (1992). Testing the Null Hypothesis of Stationarity against the Alternative of a Unit Root, Journal of Econometrics. 54, 159-178.
Phillips, P. & Perron, P. (1988). Testing for a unit root in time series regression, Biometrika. 72(2), 335-346.
Ljung, G. M. & Box, G. E. P. (1978). On a measure of lack of fit in time series models. Biometrika. 65, 297-303.
normal.test
, seasonal.test
# stationary ar process
y = arima.sim(100,model = list(ar = 0.3))
uroot.test(y)
# a random walk process
y = cumsum(y)
uroot.test(y, unit_root = "pp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.