A guided reading path
Panel data and time series: learning from change over time
Repeated observations add information and dependence. Choose the route that matches your data: many units followed over time, or a series whose ordering matters.
01 · Understand the question
Build the foundations
Read in this order, or open the question you are working on.
What is panel data? Fixed effects, random effects and the Hausman test
Panel data follow the same units over time. Learn why that helps with unobserved differences, and how fixed effects, random effects and the Hausman test work.
What is time series analysis? Patterns, models and forecasting
Time series analysis studies observations recorded over time. Learn about trends, seasonality, stationarity and how to evaluate forecasts without leakage.
02 · Examine the assumptions
Explore methods when you need them
A clear description may already answer your question. If modelling is useful, these references explain the estimator, supported options, a runnable example and limitations. Choose one for your question and assumptions.
-
Panel data
Fixed effects and random effects regression in Python (xtreg)
Fit fixed-effects, random-effects, between, first-difference and pooled panel regressions in Python with clustered or Driscoll–Kraay standard errors.
-
Tests and inference
Hausman test in Python: fixed or random effects?
Run the Hausman test of fixed against random effects in Python, read what it does and does not show, and use the cluster-robust Mundlak alternative.
-
Panel data
Arellano–Bond and system GMM in Python: xtabond and xtabond2
Estimate dynamic panel models in Python with Arellano–Bond difference GMM and Blundell–Bond system GMM, Windmeijer errors and AR(2) and Hansen tests.
-
Time series
ARIMA in Python: ARIMA, seasonal ARIMA and ARMAX models
Fit ARIMA, seasonal ARIMA and regression models with ARMA errors in Python by exact maximum likelihood, check the residuals and forecast.
-
Time series
Unit root tests in Python: ADF, KPSS, Phillips–Perron and DF-GLS
Run augmented Dickey–Fuller, Phillips–Perron, DF-GLS, KPSS and Zivot–Andrews tests in Python and read their statistics, critical values and p-values.
-
Time series
VAR and vector error correction models (VECM) in Python
Fit vector autoregressions and Johansen error-correction models in Python, with lag selection, Granger causality tests, impulse responses and forecasts.
-
Time series
Cointegration in Python: ARDL bounds test, Engle–Granger and Johansen
Test for cointegration in Python with Engle–Granger and Johansen tests, and fit ARDL models with the bounds test and error-correction form.
-
Time series
GARCH models in Python: ARCH, GARCH, GJR and EGARCH
Estimate ARCH, GARCH, GJR and EGARCH volatility models in Python by maximum likelihood, with Student-t errors, residual diagnostics and variance forecasts.
03 · Work through the evidence
Try a worked lab
These exercises use synthetic teaching data. The full handout, Python analysis and available resources are linked on each lab page.
Worked lab
Compare a unit with itself
Use panel fixed effects to separate within-unit change from between-unit differences.
Worked lab
Recognize misleading trends
Investigate why two trending series can produce a convincing but misleading regression.
Worked lab
Evaluate a forecast in time order
Separate fitting from forecast evaluation and compare performance on later observations.
Try it on your own data
OpenEconometrics is free and open source under Apache 2.0. Install the Python library or download the desktop alpha.
pip install openecon