0
$\begingroup$

I'm checking my variables for stationarity and can't figure out how to interpret the p-value listed in the output of the Dickey-Fuller test from the urca package. It seems to be inconsistent with the t-stat and critical values.

Comparing results from urca with those from the tseries package seems to suggest that the p-value in urca means something different.

I've read a number of similar posts but haven't found an answer to this particular question.

Below is the code I'm running (the first bit runs the urca DF test, the second runs the tseries DF test). I've used zero lags in both cases to make sure the models are consistent.

# Dickey-Fuller
df <- ur.df(varslvl_pre$px, type = 'trend', lags = 0)
summary(df)

adf.test(varslvl_pre$px, k = 0)

Here is the output from the urca test:

> summary(df)

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

Test regression trend 


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

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3900 -0.4439 -0.1713  0.4758  3.6120 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.493466   0.260020   1.898 0.061000 .  
z.lag.1     -0.275098   0.079786  -3.448 0.000869 ***
tt           0.022413   0.008619   2.600 0.010922 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.146 on 88 degrees of freedom
Multiple R-squared:  0.1223,    Adjusted R-squared:  0.1023 
F-statistic: 6.129 on 2 and 88 DF,  p-value: 0.003222


Value of test-statistic is: -3.4479 4.1221 6.1288 

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

The t-stat for the coefficient on the variable z.lag.1 is -3.448, and the corresponding p-value is 0.000869. However, further down in the output, the critical values for tau3 suggest that the p-value should be slightly above 5%.

Now, here is the output from the tseries test:

    Augmented Dickey-Fuller Test

data:  varslvl_pre$px
Dickey-Fuller = -3.4479, Lag order = 0, p-value = 0.05182
alternative hypothesis: stationary

The t-stat is the same as before (-3.4479), but the p-value is 0.0518 -- which seems to be consistent with the critical values from urca but is vastly different from urca's p-value.

$\endgroup$
0
$\begingroup$

The p-value given by lm(), called by ur.df(), is not the correct p-value for the ADF test. It's the usual p-value computed under stationarity assumptions, which does not hold under the unit-root null.

The p-values should be computed using the correct asymptotic distribution and critical values (which is part of the output).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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