Learn R Programming

uroot (version 1.4-1)

ADF.test: Augmented Dickey-Fuller Test

Description

This function computes the augmented Dickey-Fuller statistic for testing the null hypothesis that the long run unit root 1 exists.

Usage

ADF.test (wts, itsd, regvar=0, selectlags=list(mode="signf", Pmax=NULL))

Arguments

wts
a univariate time series object.
itsd
deterministic components to include in the model. Three types of regressors can be included: regular deterministic components, seasonal deterministic components, and any regressor variable previously defined by the user.

This argument m

regvar
regressor variables. If none regressor variables are considered, this object must be set equal to zero, otherwise, the names of a matrix object previously defined should be indicated.
selectlags
lag selection method. A list object indicating the method to select lags, mode, and the maximum lag considered. Available methods are "aic", "bic", and "signf". See details. Pmax

Value

Details

The auxiliar regression is defined as,

$\delta y_t = \rho y_{t-1} + \epsilon_t,$

where $\delta$ is the first order operator. Hence, under the null hypothesis $\rho=0$ and the long run unit root 1 exists.

Available methods are the following. "aic" and "bic" follows a top-down strategy based on the Akaike's and Schwarz's information criteria, and "signf" removes the non-significant lags at the 10% level of significance until all the selected lags are significant. By default, the maximum number of lags considered is $round(10*log10(n))$, where $n$ is the number of observations.

It is also possible to set the argument selectlags equals to a vector, mode=c(1,3,4), then those lags are directly included in the auxiliar regression and Pmax is ignored.

References

D.A. Dickey and W.A. Fuller (1981), Likelihood ratio statistics for autoregressive time series with a unit root. Econometrica, 49, 1057-1071.

W.A. Fuller (1976), Introduction to Statistical Time Series. Jonh Wiley, New York.

See Also

ADF.rectest.

Examples

Run this code
## ADF test with constant, trend and seasonal dummies.
    data(AirPassengers)
    lairp <- log(AirPassengers)
    adf.out1 <- ADF.test(wts=lairp, itsd=c(1,1,c(1:11)),
                  regvar=0, selectlags=list(mode="bic", Pmax=12))
    adf.out1
    adf.out2 <- ADF.test(wts=lairp, itsd=c(1,1,c(1:11)),
                  regvar=0, selectlags=list(mode="signf", Pmax=NULL))
    adf.out2

Run the code above in your browser using DataLab