21
$\begingroup$

I am running the following unit root test (Dickey-Fuller) on a time series using the ur.df() function in the urca package.

The command is:

summary(ur.df(d.Aus, type = "drift", 6))

The output is:

############################################### 
# 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 
-0.266372 -0.036882 -0.002716  0.036644  0.230738 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
(Intercept)  0.001114   0.003238   0.344  0.73089   
z.lag.1     -0.010656   0.006080  -1.753  0.08031 . 
z.diff.lag1  0.071471   0.044908   1.592  0.11214   
z.diff.lag2  0.086806   0.044714   1.941  0.05279 . 
z.diff.lag3  0.029537   0.044781   0.660  0.50983   
z.diff.lag4  0.056348   0.044792   1.258  0.20899   
z.diff.lag5  0.119487   0.044949   2.658  0.00811 **
z.diff.lag6 -0.082519   0.045237  -1.824  0.06874 . 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Residual standard error: 0.06636 on 491 degrees of freedom
Multiple R-squared: 0.04211,    Adjusted R-squared: 0.02845 
F-statistic: 3.083 on 7 and 491 DF,  p-value: 0.003445 


Value of test-statistic is: -1.7525 1.6091 

Critical values for test statistics: 
      1pct  5pct 10pct
tau2 -3.43 -2.86 -2.57
phi1  6.43  4.59  3.78
  1. What do the significance codes (Signif. codes) mean? I noticed that some of them where written against: z.lag.1, z.diff.lag.2, z.diff.lag.3 (the "." significance code) and z.diff.lag.5 (the "**" significance code).

  2. The output gives me two (2) values of test statistic: -1.7525 and 1.6091. I know that the ADF test statistic is the first one (i.e. -1.7525). What is the second one then?

  3. Finally, in order to test the hypothesis for unit root at the 95% significance level, I need to compare my ADF test statistic (i.e. -1.7525) to a critical value, which I normally get from a table. The output here seems to give me the critical values through. However, the question is: which critical value between "tau2" and "phi1" should I use.

Thank you for your response.

$\endgroup$
4
  • $\begingroup$ 1 - signif codes should be clear ... lag has double star so it is p=0.01 2- those test different H0s: "none" or "drift" or "trend" 3- critical values, again, same thing, depends on which H0 you wish to consider $\endgroup$
    – joint_p
    Commented Mar 4, 2012 at 3:23
  • $\begingroup$ @joint_p I am sorry, but I am only a beginner. Your answers were very straight-forward. Could you please elaborate more on what you said? I would really appreciate it. Thank you. $\endgroup$ Commented Mar 4, 2012 at 3:28
  • $\begingroup$ amazon.com/Analysis-Integrated-Cointegrated-Time-Use/dp/… this is a very good book, I used to study with it $\endgroup$
    – joint_p
    Commented Mar 4, 2012 at 3:33
  • $\begingroup$ very interesting post and answers. I just have a doubt with respect to the table explained by user3096626. Which software reports in the ADF test output the values of the \tau_{\alpha \mu}, \tau_{\alpha \tau} and \tau_{\beta \tau}? Obviously, R doesn't $\endgroup$
    – Yon Cubas
    Commented May 25, 2019 at 8:18

5 Answers 5

30
$\begingroup$

It seems the creators of this particular R command presume one is familiar with the original Dickey-Fuller formulae, so did not provide the relevant documentation for how to interpret the values. I found that Enders was an incredibly helpful resource (Applied Econometric Time Series 3e, 2010, p. 206-209--I imagine other editions would also be fine). Below I'll use data from the URCA package, real income in Denmark as an example.

> income <- ts(denmark$LRY)

It might be useful to first describe the 3 different formulae Dickey-Fuller used to get different hypotheses, since these match the ur.df "type" options. Enders specifies that in all of these 3 cases, the consistent term used is gamma, the coefficient for the previous value of y, the lag term. If gamma=0, then there is a unit root (random walk, nonstationary). Where the null hypothesis is gamma=0, if p<0.05, then we reject the null (at the 95% level), and presume there is no unit root. If we fail to reject the null (p>0.05) then we presume a unit root exists. From here, we can proceed to interpreting the tau's and phi's.

  1. type="none": $\Delta y_t = \gamma \, y_{t-1} + e_t$ (formula from Enders p. 208)

(where $e_t$ is the error term, presumed to be white noise; $\gamma = a-1$ from $y_t = a \,y_{t-1} + e_t$; $y_{t-1}$ refers to the previous value of $y$, so is the lag term)

For type= "none," tau (or tau1 in R output) is the null hypothesis for gamma = 0. Using the Denmark income example, I get "Value of test-statistic is 0.7944" and the "Critical values for test statistics are: tau1 -2.6 -1.95 -1.61. Given that the test statistic is within the all 3 regions (1%, 5%, 10%) where we fail to reject the null, we should presume the data is a random walk, ie that a unit root is present. In this case, the tau1 refers to the gamma = 0 hypothesis. The "z.lag1" is the gamma term, the coefficient for the lag term (y(t-1)), which is p=0.431, which we fail to reject as significant, simply implying that gamma isn't statistically significant to this model. Here is the output from R

> summary(ur.df(y=income, type = "none",lags=1))
> 
> ############################################### 
> # Augmented Dickey-Fuller Test Unit Root Test # 
> ############################################### 
> 
> Test regression none 
> 
> 
> Call:
> lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
> 
> Residuals:
>       Min        1Q    Median        3Q       Max 
> -0.044067 -0.016747 -0.006596  0.010305  0.085688 
> 
> Coefficients:
>             Estimate Std. Error t value Pr(>|t|)
> z.lag.1    0.0004636  0.0005836   0.794    0.431
> z.diff.lag 0.1724315  0.1362615   1.265    0.211
> 
> Residual standard error: 0.0251 on 51 degrees of freedom
> Multiple R-squared:  0.04696,   Adjusted R-squared:  0.009589 
> F-statistic: 1.257 on 2 and 51 DF,  p-value: 0.2933
> 
> 
> Value of test-statistic is: 0.7944 
> 
> Critical values for test statistics: 
>      1pct  5pct 10pct
> tau1 -2.6 -1.95 -1.61
  1. type = "drift" (your specific question above): : $\Delta y_t = a_0 + \gamma \, y_{t-1} + e_t$ (formula from Enders p. 208)

(where $a_0$ is "a sub-zero" and refers to the constant, or drift term) Here is where the output interpretation gets trickier. "tau2" is still the $\gamma=0$ null hypothesis. In this case, where the first test statistic = -1.4462 is within the region of failing to reject the null, we should again presume a unit root, that $\gamma=0$.
The phi1 term refers to the second hypothesis, which is a combined null hypothesis of $a_0 = \gamma = 0$. This means that BOTH of the values are tested to be 0 at the same time. If p<0.05, we reject the null, and presume that AT LEAST one of these is false--i.e. one or both of the terms $a_0$ or $\gamma$ are not 0. Failing to reject this null implies that BOTH $a_0$ AND $\gamma = 0$, implying 1) that $\gamma=0$ therefore a unit root is present, AND 2) $a_0=0$, so there is no drift term. Here is the R output

> summary(ur.df(y=income, type = "drift",lags=1))
> 
> ############################################### 
> # 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 
> -0.041910 -0.016484 -0.006994  0.013651  0.074920 
> 
> Coefficients:
>             Estimate Std. Error t value Pr(>|t|)
> (Intercept)  0.43453    0.28995   1.499    0.140
> z.lag.1     -0.07256    0.04873  -1.489    0.143
> z.diff.lag   0.22028    0.13836   1.592    0.118
> 
> Residual standard error: 0.0248 on 50 degrees of freedom
> Multiple R-squared:  0.07166,   Adjusted R-squared:  0.03452 
> F-statistic:  1.93 on 2 and 50 DF,  p-value: 0.1559
> 
> 
> Value of test-statistic is: -1.4891 1.4462 
> 
> Critical values for test statistics: 
>       1pct  5pct 10pct
> tau2 -3.51 -2.89 -2.58
> phi1  6.70  4.71  3.86
  1. Finally, for the type="trend": $\Delta y_t = a_0 + \gamma * y_{t-1} + a_{2}t + e_t$ (formula from Enders p. 208)

(where $a_{2}t$ is a time trend term) The hypotheses (from Enders p. 208) are as follows:
tau: $\gamma=0$
phi3: $\gamma = a_2 = 0$
phi2: $a_0 = \gamma = a_2 = 0$
This is similar to the R output. In this case, the test statistics are -2.4216 2.1927 2.9343 In all of these cases, these fall within the "fail to reject the null" zones (see critical values below). What tau3 implies, as above, is that we fail to reject the null of unit root, implying a unit root is present. Failing to reject phi3 implies two things: 1) $\gamma = 0$ (unit root) AND 2) there is no time trend term, i.e., $a_2=0$. If we rejected this null, it would imply that one or both of these terms was not 0. Failing to reject phi2 implies 3 things: 1) $\gamma = 0$ AND 2) no time trend term AND 3) no drift term, i.e. that $\gamma =0$, that $a_0 = 0$, and that $a_2 = 0$. Rejecting this null implies that one, two, OR all three of these terms was NOT zero.
Here is the R output

> summary(ur.df(y=income, type = "trend",lags=1))
> 
> ############################################### 
> # 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.036693 -0.016457 -0.000435  0.014344  0.074299 
> 
> Coefficients:
>               Estimate Std. Error t value Pr(>|t|)  
> (Intercept)  1.0369478  0.4272693   2.427   0.0190 *
> z.lag.1     -0.1767666  0.0729961  -2.422   0.0192 *
> tt           0.0006299  0.0003348   1.881   0.0659 .
> z.diff.lag   0.2557788  0.1362896   1.877   0.0665 .
> ---
> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> 
> Residual standard error: 0.02419 on 49 degrees of freedom
> Multiple R-squared:  0.1342,    Adjusted R-squared:  0.08117 
> F-statistic: 2.531 on 3 and 49 DF,  p-value: 0.06785
> 
> 
> Value of test-statistic is: -2.4216 2.1927 2.9343 
> 
> 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

In your specific example above, for the d.Aus data, since both of the test statistics are inside of the "fail to reject" zone, it implies that $\gamma=0$ AND $a_0 = 0$, meaning that there is a unit root, but no drift term.

$\endgroup$
1
  • $\begingroup$ @ Jeremy, In your detailed answer part 3 (with trend) you mentioned "In this case, the test statistics are -2.4216 2.1927 2.9343. In all of these cases, these fall within the "fail to reject the null" zones (see critical values below)." My question is if 2.1927 is test statistic for phi2, should it be check it against phi2 6.50 4.88 4.16? And if that is correct, what is the condition to accept the phi2 H0 (unit root without trend and drift)? $\endgroup$
    – Saraz
    Commented May 30, 2019 at 6:10
5
$\begingroup$

As joint-p already pointed out, the significance codes are fairly standard and they correspond to p-values, i.e. the statistical significance of a hypothesis test. a p-value of .01 means that the conclusion is true within 99% confidence.

The Wikipedia article on Dickey-Fuller describes the three versions of the Dickey-Fuller test: the "unit root", "unit root with drift", and "unit root with drift and deterministic time trend", or what is referred to in the urca documentation as type= "none", "drift", and "trend", respectively.

Each of these tests is a progressively more complex linear regression. In all of them there is the root, but in the drift there is also a drift coefficient, and in the trend there is also a trend coefficient. Each of these coefficients has an associated significance level. While the significance of the root coefficient is the most important and the main focus of the DF test, we might also be interested in knowing whether or not the trend/drift is statistically significant as well. After tinkering around with the different modes and seeing which coefficients appear/disappear in the t-tests, I was able to easily identify which coefficient corresponded to which t-test.

They can be written as follows (from wiki page):

(unit root) $\Delta y_{t} = \delta y_{t-1} + u_{t}$

(with drift) $\Delta y_{t} = \delta y_{t-1} + a_{0} + u_{t}$

(with trend) $\Delta y_{t} = \delta y_{t-1} + a_{0} + a_{1}t + u_{t}$

In your case, "tau2" corresponds to $\delta$, while "phi1" corresponds to $a_{0}$. You will also see a third coefficient appear in the "trend" test, which would correspond to $a_{1}$ in the third equation above. However the names of the variables will change when you switch to "trend", so be careful and make sure you do this tinkering yourself to check. I believe in "trend" mode, "tau3" corresponds to $\delta$, "phi2" corresponds to $a_{0}$, and "phi3" corresponds to $a_{1}$.

$\endgroup$
3
  • $\begingroup$ "a p-value of .01 means that the conclusion is true within 99% confidence." This is not a correct interpretation of a p-value $\endgroup$
    – Glen_b
    Commented Nov 4 at 2:16
  • $\begingroup$ sorry, I should have said that it is the probability of observing the data under the null hypothesis that the series does not have a unit root, under certain assumptions $\endgroup$
    – Paul
    Commented Nov 5 at 4:50
  • $\begingroup$ That's closer to correct. It's the probability under H0 of obtaining a test statistic at least as extreme as the one from the sample. If you were to only look at the probability of the data, rather than adding in all the more extreme cases as well, it would give a p-value of 0 for every continuously distributed statistic. The ASA gives it informally as "a p-value is the probability under a specified statistical model that a statistical summary of the data would be equal to or more extreme than its observed value." $\endgroup$
    – Glen_b
    Commented Nov 5 at 15:15
5
$\begingroup$

I found Jeramy's answer pretty easy to follow, but constantly found myself trying to walk through the logic correctly and making mistakes. I coded up an R function that interprets each of the three types of models, and gives warnings if there are inconsistencies or inconclusive results (I don't think there ever should inconsistencies if I understand the ADF math correctly, but I thought still a good check in case the ur.df function has any defects).

Please take a look. Happy to take comments/correction/improvements.

https://gist.github.com/hankroark/968fc28b767f1e43b5a33b151b771bf9

$\endgroup$
2
  • 1
    $\begingroup$ Your function looks like it was made with a lot of efforts; however, adding a reproducible example to it would be helpful. You may want to pick a time series (maybe one already available in R or in a package) run the dickey fuller test on it and then use your function just for interested people to see what it does. $\endgroup$ Commented Oct 29, 2019 at 9:29
  • $\begingroup$ Reproducible example interp_urdf(urdf = ur.df(mtcars$mpg, type = "drift")) $\endgroup$
    – MSD
    Commented Apr 29, 2020 at 8:00
4
$\begingroup$

Summary of Dickey Fuller Tests

More info in Roger Perman's lecture notes on unit root tests

See also table 4.2 in Enders, Applied Econometric Time Series (4e), which summarizes the different hypotheses to which these test statistics refer. Content agrees with the image provided above.

$\endgroup$
-4
$\begingroup$

phi1 phi2 phi3 are equivalent to F-tests in ADF framework

$\endgroup$
1
  • 4
    $\begingroup$ Can you expand on this answer a little? At the moment it is somewhat cryptic. Why should these be equivalent? $\endgroup$
    – Andy
    Commented Sep 5, 2014 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.