Made for: Master's dissertation student
Your data is ready. The model isn't cooperating.
Sound familiar?
- The Hausman test says one thing and your supervisor says another
- Stata or EViews throws errors you can't decode at 1 a.m.
- You're not sure your results are even the right ones to report
- The deadline is fixed, and your supervisor has 20 other students
We diagnose your model, run it with you, and explain every number so you can defend it.
Why stationarity matters
A series is stationary if its mean, variance and autocorrelation don't change over time. Most macro and financial levels (GDP, prices, exchange rates, stock indices) are non-stationary: they wander with no fixed mean, and shocks persist.
Regressing one non-stationary series on another can produce a spurious regression (Granger & Newbold, 1974), with significant results even when the variables are unrelated. The order of integration also decides your model:
| Variables are… | Model to use |
|---|---|
| All I(0), stationary in levels | VAR or OLS in levels |
| All I(1), stationary after first differencing | Test cointegration: Johansen/VECM or Engle-Granger |
| A mix of I(0) and I(1), none I(2) | ARDL bounds test |
| Any I(2) | Rethink: difference further or transform (ARDL is invalid) |
The main tests
| Test | Null hypothesis (H₀) | Notes |
|---|---|---|
| ADF (Dickey & Fuller, 1979; augmented) | Unit root (non-stationary) | Most used; adds lagged differences for autocorrelation |
| Phillips-Perron (PP) | Unit root | Non-parametric correction for autocorrelation and heteroskedasticity |
| KPSS (Kwiatkowski et al., 1992) | Stationary | Reverse null; a useful confirmation |
| Zivot-Andrews | Unit root with no break | Allows one endogenous structural break |
Using ADF/PP and KPSS is good practice: because their nulls are opposite, agreement makes the conclusion much stronger.
Step by step
- Plot each series. Trending? Use a test with intercept and trend. Fluctuating around a non-zero mean? Intercept only.
- Choose the lag length by an information criterion (AIC or SIC/BIC). EViews does this automatically.
- Test in levels. If you can't reject the unit root, the series is non-stationary.
- Test in first differences (usually with intercept only). If now stationary, the series is I(1).
- Summarise in a table: statistic and p-value in levels and in differences, and the conclusion I(0) or I(1).
* Stata
tsset year
dfuller lgdp, trend lags(2) // ADF with trend
dfuller D.lgdp, lags(1) // first difference
pperron lgdp, trend
kpss lgdp // user-written: ssc install kpss
# R
library(urca); library(tseries)
summary(ur.df(df$lgdp, type = "trend", selectlags = "AIC"))
kpss.test(df$lgdp, null = "Trend")
pp.test(df$lgdp)
In EViews: open the series, then View → Unit Root Tests → Standard Unit Root Test. Choose the test type (ADF, PP, KPSS), levels or first difference, and whether to include an intercept or trend.
Reading the ADF result
Compare the ADF t-statistic with the critical values (or read the MacKinnon p-value):
- Statistic more negative than the 5% critical value (p < 0.05): reject the unit root, so the series is stationary.
- Otherwise: you can't reject the unit root, so it's non-stationary at that level.
For KPSS it's the reverse: a statistic above the critical value rejects stationarity.
Panel unit root tests
For panels with longer T (macro panels with T ≥ 15–20), use:
- First generation (assume cross-sectional independence): Levin-Lin-Chu (LLC, common unit root), Im-Pesaran-Shin (IPS, individual unit roots), Fisher-ADF/PP.
- Second generation (allow cross-sectional dependence): CIPS (Pesaran, 2007). Run the Pesaran CD test first; if it rejects independence, CIPS is the defensible choice.
xtunitroot ips lgdp, trend lags(aic 2)
xtunitroot llc lgdp, trend
* CIPS: ssc install xtcips (user-written)
How to report it
Example: Table 2 reports ADF and KPSS tests. GDP, energy consumption and CO₂ emissions are non-stationary in levels but stationary in first differences, so they are I(1). Trade openness is stationary in levels, I(0). Because the variables are a mix of I(0) and I(1), with none I(2), we use the ARDL bounds-testing approach.
Common mistakes
- Testing only in levels and stopping there.
- Using a trend specification on a series without a visible trend (it lowers the test's power).
- Ignoring structural breaks (2008 crisis, COVID). A break can make a stationary series look non-stationary. Add Zivot-Andrews.
- Running first-generation panel tests when units are clearly interdependent (e.g. EU countries).
Frequently asked questions
ADF and KPSS give different answers. What now?
This happens with near-unit-root or short series. Report both, add PP or a break test, and choose the model that's robust to the ambiguity: ARDL works whether a variable is I(0) or I(1).
Do I need unit root tests for panel data with T = 8?
Generally no. With short panels, unit root tests have very low power and are rarely expected. Focus on the panel structure (Panel data analysis).
Should I log my variables first?
Usually yes for levels like GDP or prices: logs stabilise variance and give elasticities. Test the variables in the form you'll use in the model.