[R] A question on Unit Root Test using "urca" toolbox

jpm miao miaojpm at gmail.com
Fri Feb 3 08:45:29 CET 2012


Hello,

   I have a question on unit root test with urca toolbox.

   First, to run a unit root test with lags selected by BIC, I type:

> CPILD4UR<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags=12, selectlags ="BIC")
> summary(CPILD4UR)

   The results indicate that the optimal lags selected by BIC is 4.

   Then I run the same unit root test with drift and 4 lags:

> CPILD4UR1<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags =4)
> summary(CPILD4UR1)

   Nevertheless, the results are different. Could anyone tells me why?
   In EViews these two are the same and the results are close to my first case.

    Thanks!

A complete log:

> CPILD4UR1<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags =4)
> summary(CPILD4UR1)

###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################

Test regression drift


Call:
lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)

Residuals:
     Min       1Q   Median       3Q      Max
-2.43555 -0.63440 -0.03048  0.53522  2.84237

Coefficients:
             Estimate Std. Error t value Pr(>|t|)
(Intercept)  0.238631   0.137262   1.739 0.084944
z.lag.1     -0.153030   0.061841  -2.475 0.014881
z.diff.lag1  0.011463   0.090330   0.127 0.899252
z.diff.lag2  0.008764   0.089850   0.098 0.922479
z.diff.lag3  0.149529   0.088930   1.681 0.095546
z.diff.lag4 -0.349870   0.088847  -3.938 0.000145

(Intercept) .
z.lag.1     *
z.diff.lag1
z.diff.lag2
z.diff.lag3 .
z.diff.lag4 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9526 on 109 degrees of freedom
Multiple R-squared: 0.2514,	Adjusted R-squared: 0.2171
F-statistic: 7.321 on 5 and 109 DF,  p-value: 5.989e-06


Value of test-statistic is: -2.4746 3.0877

Critical values for test statistics:
      1pct  5pct 10pct
tau2 -3.46 -2.88 -2.57
phi1  6.52  4.63  3.81

> CPILD4UR<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags=12, selectlags ="BIC")
> summary(CPILD4UR)

###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################

Test regression drift


Call:
lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)

Residuals:
    Min      1Q  Median      3Q     Max
-2.2551 -0.6335 -0.0372  0.5189  2.8249

Coefficients:
             Estimate Std. Error t value Pr(>|t|)
(Intercept)  0.250966   0.141141   1.778 0.078392
z.lag.1     -0.141102   0.062614  -2.254 0.026388
z.diff.lag1 -0.006698   0.093897  -0.071 0.943274
z.diff.lag2 -0.014133   0.093575  -0.151 0.880251
z.diff.lag3  0.144329   0.091552   1.576 0.118042
z.diff.lag4 -0.355845   0.091441  -3.892 0.000179

(Intercept) .
z.lag.1     *
z.diff.lag1
z.diff.lag2
z.diff.lag3
z.diff.lag4 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9462 on 101 degrees of freedom
Multiple R-squared: 0.2521,	Adjusted R-squared: 0.215
F-statistic: 6.808 on 5 and 101 DF,  p-value: 1.647e-05


Value of test-statistic is: -2.2535 2.5438

Critical values for test statistics:
      1pct  5pct 10pct
tau2 -3.46 -2.88 -2.57
phi1  6.52  4.63  3.81



More information about the R-help mailing list