Augmented Dickey-Fuller and Phillips-Perron Unit Roots Tests using R
Unit Roots Tests
How do you find out if a series is stationary or not?
Order of integration of a Series
A series which is stationary after being differenced once is said to integrated of order 1 and is being denoted by I(1). In general a series which is stationary after being differenced \(d\) times is said to be integrated of order \(d\), denoted \(I(d)\). A series, which is stationary without differencing, is said to be \(I(0)\)
\(Y_t=b_0+Y_{t-1}+\epsilon_t\) –> \(I(1)\)
\(\Delta{Y_t}= Y_t-Y_{t-1}=b_0+\epsilon_t\) –> \(I(0)\)
Diagnostic test - Correlogram
Correlation between 1980 and 1980+K.
For stationary process correlelogram dies out rapidly. Series has no memory. 1980 is not related to 1985.
Statistical tests for sationarity: Simple t-test
Set up \(AR(1)\) process with drift (\(b_0\))
\(Y_t = b_0 + bY_{t-1} + \epsilon_t\) where \(\epsilon_t \sim \text{iid}(0, \sigma^2)\)
Simple approach is to estimate eq(1) using OLS and examine \(b\).
Use a t-test with null \(H_0: b=1\) (non-stationary)
against alternative \(H_a: b<1\) (stationary)
Test Statistics : TS=\((b-1)/SE(b)\) reject null hypothesis when test statistics is large negative 5% critical value is -1.65
Simple t-test based on AR(1) process with drift (\(b_0\))
\(Y_t=b_0+bY_{t-1}+\epsilon_t \\ \epsilon_t \sim iid(0,\sigma^2)\) –> (1)
Problem with simple test approach
lagged dependent variables ==> \(b\) biased downwards in small samples (i-e dynamic bias)
When \(b=1\), we have non-stationary process and standard regression analysis is invalid (i-e non-standard distribution)
Dickey Fuller (DF) Test
Subtract \(Y_{t-1}\) from both sides of eq(1).
\(Y_t-Y_{t-1}=b_0+bY_{t-1}-Y_{t-1}+\epsilon_t \\ \epsilon_t \sim iid(0,\sigma^2)\)
\[\Delta{Y_t}= b_0+\beta Y_{t-1}+\epsilon_t \\\beta=b_1-1\]
Use a t-test with: null \(H_0: \beta=0\) (non-stationary or Unit Root) against alternative \(H_0: \beta<0\)
- Large negative test statistics reject non-stationary
- This is known as unit root test since in eq(1) \(H_0: b=0\)
Variants of DF test
The different regression can be used to test the presence of a unit root
\(\Delta Y=\beta Y_{t-1}+\epsilon_t\)
\(\Delta Y=b_0+\beta Y_{t-1}+\epsilon_t\)
\(\Delta Y=b_0+\beta Y_{t-1}+b_2 t+\epsilon_t\)
- For testing if Y is a pure Random Walk
- For testing if Y is Random Walk with Drift
- For testing if Y is a Random walk with Drift and Deterministi Trend
Examples
Sample size of n=25 at 5% level of significance for eq(2)
\(\tau\) - critical value=-3.00
t-test critical value=-1.65
\(\Delta p_t=-0.007-0.190p_{t-1} \\ (-1.05) (-1.49)\)
\(\beta=-0.190\) \(\tau=-1.49>-3.00\)
hence cannot reject \(H_0\) of unit root.
Incorporating time trends in DF test for unit root
Some time series clearly display an upward or downward trend (non-stationary mean). Should therefore incorporate trend in the regression used for the DF test.
\(\Delta Y=b_0+\beta Y_{t-1}+b_2 trend+\epsilon\) –>(4) It may be the case that \(Y_t\) will be stationary around a trend, although if a trend is not included series is non-stationary.
\(H_0=\beta=0 \\H_a:\beta<0\) \(\tau \\\Delta Y_t=b_0+\beta Y_{t-1}+b_2 trend+\epsilon\)
\(H_0=\beta=0 \\H_a:\beta<0\) \(\tau_{\mu} \\\Delta Y_t=b_0+\beta Y_{t-1}+\epsilon\)
\(H_0=\beta=0 \\H_a:\beta<0\) \(\tau_{\tau} \\\Delta Y_t=\beta Y_{t-1}+\epsilon\) Critical values from Fuller (1976)
Augmented Dickey Fuller (ADF) test for unit root
Dickey Fuller tests assume that the residuals \(\epsilon_t\) in the DF regression are non-autocorrelated.
Solution: incorporated lagged dependent variables
For quarterly data add up to four lags \[\Delta Y_t=b_0+\beta Y_{t-1}+\theta_1\Delta Y_{t-1}+\theta_2\Delta Y_{t-2}+\theta_3\Delta Y_{t-3}+\theta_4\Delta Y_{t-4}+\epsilon\]
Problem arises of differentiating between models.
Use a general to specific approach to eliminate insiginficant variables Check final parsimonious model for autocorrelation.
Check F-test for significant variables
Use Information Criteria
Trade-off parsimony vs. residual variance
Conside the following series and its correlogram
![]()
The variable Y is clealry trended and question is whether trend : Deterministic or Stochastic
Choose between alternative models - The model-progress results
\[\Delta Y_t=b_0+\beta Y_{t-1}+\theta_1\Delta Y_{t-1}+\theta_2\Delta Y_{t-2}+\theta_3\Delta Y_{t-3}+\theta_4\Delta Y_{t-4}+\epsilon\] \[\Delta Y_t=b_0+\beta Y_{t-1}+\theta_1\Delta Y_{t-1}+\theta_2\Delta Y_{t-2}+\theta_3\Delta Y_{t-3}+\epsilon\]
\[\Delta Y_t=b_0+\beta Y_{t-1}+\theta_1\Delta Y_{t-1}+\theta_2\Delta Y_{t-2}+\epsilon\]
\[\Delta Y_t=b_0+\beta Y_{t-1}+\theta_1\Delta Y_{t-1}+\epsilon\]
\[\Delta Y_t=b_0+\beta Y_{t-1}+\epsilon\]
AIC, SBC, HQC or some other criteria maybe used beside having judgement for appropriate lag selection.
ADF vs PP
Comparison of ADF Test and PP Test Features
| Underlying Assumption |
No serial correlation in error terms |
No assumptions about serial correlation |
| Applicability |
Data with no significant serial correlation |
Data with potential serial correlation |
| Implementation |
Requires lag selection |
No lag selection required |
| Advantages |
Common, well-established test |
More robust to serial correlation |
| Disadvantages |
Requires attention to serial correlation |
Less common, may be computationally expensive |
Choosing ADF or PP
If you’re confident there’s no serial correlation in your data, ADF can be a good choice.
If you suspect serial correlation or are unsure, the PP test is generally recommended for its robustness.
In practice, it’s often recommended to run both tests and compare the results. If they agree on the presence or absence of a unit root, you can be more confident in the conclusion.
Three main aspects of Unit root testing
Determining components (constant , time trend).
ADF test- lag length , use F-test or Schwarz Information Criteria
In what sequence should we test?
Phi and tau tests
Three Strategy for Unit Roots
Formal Strategy
Use informal tests- eye ball data and correlogram
Incorporate Time trend if data is upwards trending
Specification of ADF test - how many lags should we incorporate to avoid serial correlation?
Example
- Real GDP (2000 Prices) Seasonally Adjusted
- Plot Time Series- Non-Stationary (i-e. time varying mean and correlogram non-zero)
Unit Root Testing
1) Plot first difference of time series- Stationary