ur.df2 {erer}R Documentation

Augmented-Dickey-Fuller Unit Root Test revised

Description

Augmented-Dickey-Fuller Unit Root Test revised

Usage

ur.df2(y, type = c("none", "drift", "trend"), lags = 1, 
  selectlags = c("Fixed", "AIC", "BIC"), digit = 2)

Arguments

y

Vector to be tested for a unit root.

type

Test type, either "none", "drift" or "trend".

lags

Number of lags for endogenous variable to be included.

selectlags

Lag selection can be achieved according to the Akaike "AIC" or the Bayes "BIC" information criteria. The maximum number of lags considered is set by lags. The default is to use a "fixed" lag length set by lags.

digit

The digit choice.

Details

This is a modification of ur.df in the library of urca. The function was written in S4, and it is changed into S3. The lag selected by AIC or BIC is reported explicitly through lag.used in the output list. In addition, the values of AIC and BIC statistics are reported.

Value

Return an object of class ur.df2: the new outputs are lag.used, aic, and bic.

y

input of y

model

input of model

cval

critical values

lags

input of lags

lag.used

acutal lags used

teststat

test statistics

res

resiuals of the test regression

aic

aic values

bic

bic values

test.name

test name

Methods

Two methods are defined as follows:

print:

print test statistics and critical values.

plot:

plot outputs.

Author(s)

Changyou Sun (cs258@msstate.edu)

See Also

ur.df in urca library.

Examples

# see the code for the study: Japan and China wood product imports

[Package erer version 3.1 Index]