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
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.
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.