Augmented-Dickey-Fuller Unit Root Test
ur.df.RdPerforms the augmented Dickey-Fuller unit root test.
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 bylags. The default is to use a"fixed"lag length set bylags.
Details
The function ur.df() computes the augmented Dickey-Fuller
test. If type is set to "none" neither an intercept nor a trend
is included in the test regression. If it is set to "drift" an
intercept is added and if it is set to "trend" both an intercept
and a trend is added. The critical values are taken from Hamilton
(1994) and Dickey and Fuller(1981).
References
Dickey, D. A. and Fuller, W. A. (1979), Distributions of the Estimators For Autoregressive Time Series with a Unit Root, Journal of the American Statistical Association, 75, 427–431.
Dickey, D. A. and Fuller, W. A. (1981), Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root, Econometrica, 49, 1057–1072.
Hamilton (1994), Time Series Analysis, Princeton University Press.
Examples
data(Raotbl3)
attach(Raotbl3)
lc.df <- ur.df(y=lc, lags=3, type='trend')
summary(lc.df)
#>
#> ###############################################
#> # Augmented Dickey-Fuller Test Unit Root Test #
#> ###############################################
#>
#> Test regression trend
#>
#>
#> Call:
#> lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -0.044714 -0.006525 0.000129 0.006225 0.045353
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.7976591 0.3547775 2.248 0.0270 *
#> z.lag.1 -0.0758706 0.0338880 -2.239 0.0277 *
#> tt 0.0004915 0.0002159 2.277 0.0252 *
#> z.diff.lag1 -0.1063957 0.1006744 -1.057 0.2934
#> z.diff.lag2 0.2011373 0.1012373 1.987 0.0500 .
#> z.diff.lag3 0.2998586 0.1020548 2.938 0.0042 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 0.01307 on 89 degrees of freedom
#> Multiple R-squared: 0.1472, Adjusted R-squared: 0.09924
#> F-statistic: 3.071 on 5 and 89 DF, p-value: 0.01325
#>
#>
#> Value of test-statistic is: -2.2389 3.7382 2.5972
#>
#> Critical values for test statistics:
#> 1pct 5pct 10pct
#> tau3 -4.04 -3.45 -3.15
#> phi2 6.50 4.88 4.16
#> phi3 8.73 6.49 5.47
#>