# Unit root testing inaccuracies with ADF

I am taking a course in econometrics. I met the following task:

Perform the Augmented Dickey-Fuller (ADF) test for the two $$\log(CPI)$$ series. In the ADF test equation, include a constant ($$\alpha$$), a deterministic trend term ($$\beta_t$$), three lags of $$DP = \Delta\log(CPI)$$ and, of course, the variable of interest $$\log(CPI_{t−1})$$. Report the coefficient of $$\log(CPI_{t−1})$$ and its standard error and t-value, and draw your conclusion.

The dataset is presented here.

Separately, I present the data here: Text Excel Eviews

• CPI_EUR: Consumer price index in the Euro area
• CPI_USA: Consumer price index in the United States of America
• LOGPEUR: logarithm of CPI_EUR
• LOGPUSA: logarithm of CPI_USA
• DPEUR: first difference of LOGPEUR, monthly inflation rate
• DPUSA: first difference of LOGPUSA, monthly inflation rate
• TREND: linear trend (value 1 in Jan 2000 to value 144 in Dec 2011)

I did the corresponding ADF test with constant, trend and three lags in R ("urca" package), and got this result for LOGPEUR:

###############################################
# 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.0112029 -0.0015077  0.0002827  0.0020134  0.0096446

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  6.423e-01  2.264e-01   2.837  0.00526 **
z.lag.1     -1.374e-01  4.861e-02  -2.826  0.00543 **
tt           2.374e-04  8.496e-05   2.795  0.00596 **
z.diff.lag1  1.443e-01  8.665e-02   1.665  0.09829 .
z.diff.lag2 -9.024e-02  8.521e-02  -1.059  0.29149
z.diff.lag3 -1.128e-01  8.565e-02  -1.317  0.19023
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.00336 on 134 degrees of freedom
Multiple R-squared:  0.1202,    Adjusted R-squared:  0.08739
F-statistic: 3.662 on 5 and 134 DF,  p-value: 0.003877

Value of test-statistic is: -2.8263 14.4278 4.0293

Critical values for test statistics:
1pct  5pct 10pct
tau3 -3.99 -3.43 -3.13
phi2  6.22  4.75  4.07
phi3  8.43  6.49  5.47


and this for LOGPUSA:

###############################################
# 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.0131466 -0.0018593 -0.0001252  0.0019564  0.0088764

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  3.496e-01  1.273e-01   2.747  0.00684 **
z.lag.1     -7.434e-02  2.719e-02  -2.734  0.00709 **
tt           1.514e-04  5.723e-05   2.645  0.00914 **
z.diff.lag1  6.091e-01  8.404e-02   7.248 3.03e-11 ***
z.diff.lag2 -1.512e-01  9.650e-02  -1.567  0.11939
z.diff.lag3 -6.457e-03  8.623e-02  -0.075  0.94042
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.003506 on 134 degrees of freedom
Multiple R-squared:  0.326, Adjusted R-squared:  0.3009
F-statistic: 12.97 on 5 and 134 DF,  p-value: 2.724e-10

Value of test-statistic is: -2.7345 7.0523 3.8741

Critical values for test statistics:
1pct  5pct 10pct
tau3 -3.99 -3.43 -3.13
phi2  6.22  4.75  4.07
phi3  8.43  6.49  5.47


But the correct answer in the course is this:

include constant and trend in ADF-test equation 5% critical value ADF = -3.5

• EUR: coef of $$\log(CPI_{t-1})$$ has $$t = -2.45 > -3.5$$
• USA: coef of $$\log(CPI_{t-1})$$ has $$t = -2.40 > -3.5$$

I am interested in the following question: Did I do the testing wrong, or is this a bug in the course, or is it a bug in the “urca” package?

Also, please help me to understand what the other two values mean in Value of test-statistic is: string of ur.df() input.

• Your ADF stat (e.g. -2.82 for the first series) is not too far from what is being claimed (-2.45) and the null is not rejected, which is consistent with what one expects from a CPI series---although it's not clear where the critical value -3.5 came from. The package says it's -3.43. One of the cv's is wrong. Commented Sep 5, 2020 at 2:08
• @Michael it is possible that in the correct answer in this course, such a critical value is due to the round in the number. What cannot be said about test statistics... Commented Sep 5, 2020 at 14:09
• "...such a critical value is due to the round in the number..."---it's pretty strange to be rounding up critical values at 1 decimal place. "What cannot be said about test statistics..."---it's easy to compute the ADF statistic manually and compare with the package. You'll see the package computation is correct. One likely issue is that different number of lags in the ADF regression would give different values for the statistic. Commented Sep 6, 2020 at 11:21