adf.test: Augmented Dickey Fuller Test

Description Usage Arguments Details Value Examples

Description

Computes the Augmented Dickey-Fuller test for the null that x has a unit root.

Usage

1
adf.test(object, ...)

Arguments

object

FLVector

k

the lag order to calculate the test statistic.

trend

1 for including trend.

Details

The general regression equation which incorporates a constant and a linear trend is used and the t-statistic for a first order autoregressive coefficient equals one is computed. The number of lags used in the regression is k. The default value of trunc((length(x)-1)^(1/3)) corresponds to the suggested upper bound on the rate at which the number of lags, k, should be made to grow with the sample size for the general ARMA(p,q) setup.

Value

A list with class "htest" containing the following components:

statistic

the value of the test statistic.

parameter

the lag order.

p.value

the p-value of the test.

method

a character string indicating what type of test was performed.

data.name

a character string giving the name of the data.

alternative

a character string describing the alternative hypothesis.

Examples

1
2
3
4
5
6
7
x<-rnorm(1000)
flv<-as.FLVector(x)
flobj<-adf.test(object = flv, k=2)
     y <- diffinv(x)   # contains a unit-root
fly <- as.FL(y)
flobjy <- adf.test(object = fly, k=2)
robj<-adf.test(object = y, k=2)

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.