Advanced Econometrics and Data Analysis

Please click here to access the content

Statistical Analysis with Python — Faculty Development Program

Complete Content Index (10 Modules + 3 Bonus + 1 Hands-On)


Part I: Foundations of Statistical Inference

Module 1: Understanding Common Assumptions in Statistical Analysis – Why assumptions matter — the danger of ignoring them in published research – Normality: Shapiro-Wilk, Kolmogorov-Smirnov, Q-Q plots — when violations matter and when the CLT saves you – Homoscedasticity: Breusch-Pagan, White test, residual-vs-fitted plots — and the robust standard errors remedy – Linearity: Ramsey RESET test, component-plus-residual (CPR) plots – Independence: Durbin-Watson, runs test, clustering implications – Multicollinearity: VIF, condition indices — and why polynomial terms always have high VIF – Data: Mroz married women’s labour supply (wooldridge) – Libraries: statsmodels, scipy.stats, matplotlib, seaborn

Module 2: Instrumental Variables — Concept and Applications – The endogeneity problem: omitted variables, measurement error, simultaneity – What makes a valid instrument: relevance (testable) and exogeneity (argued) – Two-Stage Least Squares (2SLS): first-stage, second-stage, mechanics and intuition – Weak instruments: F-statistic > 10 rule of thumb, Stock-Yogo critical values – Overidentification: Hansen J-test, Sargan test — testing what cannot be tested – Real research: Angrist-Krueger (1991) quarter of birth, Acemoglu-Johnson-Robinson (2001) settler mortality – LATE interpretation: your IV estimate may be local, not average – Data: Mroz (education instrumented by parental education) – Libraries: linearmodels, statsmodels


Part II: Regression Models — Classical to Modern

Module 3: Classical and Regularised Regression Models – Multiple Regression: specification, interaction terms, polynomial terms, interpretation – Logit and Probit: binary outcomes, odds ratios, marginal effects — when to use which – Lasso (L1): automatic variable selection, tuning alpha via cross-validation, when coefficients go to zero – Ridge (L2): shrinkage without selection, handling multicollinearity – Elastic Net: combining L1 and L2 — for groups of correlated predictors – Model comparison: AIC, BIC, cross-validated R², decision flowchart (causal vs prediction) – Data: Mroz (regression), sklearn generated data (regularisation) – Libraries: statsmodels, scikit-learn

Module 4: Bayesian and Generalised Regression Models – Bayesian philosophy: priors, likelihood, posterior — explained for the frequentist mind – Choosing priors: non-informative, weakly informative, informative — with visual density plots – MCMC: what it does, trace plots (“fat hairy caterpillar”), R-hat, effective sample size – Generalised Linear Models: Poisson (counts), Negative Binomial (overdispersion), Gamma (skewed positive) – Zero-inflated and hurdle models: when zeros come from two different processes – Bayesian model comparison: WAIC, LOO-CV — using the full posterior, not point estimates – Data: Mroz (Bayesian wage regression), simulated patent data (GLM) – Libraries: pymc, bambi, arviz, statsmodels


Part III: Time Series Econometrics

Module 5: Time Series Forecasting Techniques – Stationarity: ADF test (H₀: unit root), KPSS test (H₀: stationary) — decision rule table with all 4 outcomes – AR models: PACF interpretation, AR(2) estimation, how p-values confirm lag selection, reading AutoReg output – MA models: ACF interpretation, comparison of ARIMA(p,d,q) candidates by AIC – ARIMA: Box-Jenkins methodology flowchart, auto_arima selection, Ljung-Box diagnostics – SARIMA: seasonal patterns, SARIMA(1,1,1)(1,0,1)₁₂ on monthly data – Forecasting: dynamic vs static, prediction intervals widening, RMSE/MAE/MAPE evaluation – Mean reversion: worked example quarter-by-quarter, spring analogy, why flat forecasts are honest – Data: US GDP (statsmodels macrodata, quarterly 1959-2009) – Libraries: statsmodels, pmdarima

Module 6: Volatility and Multivariate Time Series Models – Volatility clustering: ACF of returns vs ACF of squared returns, fat tails (kurtosis), ARCH-LM test – ARCH(1): time-varying variance — α as shock transmission rate, reading output column-by-column – GARCH(1,1): adding β for persistence, α+β interpretation, half-life calculation (step-by-step) – Asymmetric GARCH: EGARCH (leverage effect γ < 0), GJR-GARCH, news impact curve – VAR: multi-equation systems, Granger causality, impulse response functions (IRF), FEVD – VECM: cointegration (Johansen test), error correction mechanism, loading coefficients – Data: simulated GARCH returns, US macro data (GDP, inflation, interest rates) – Libraries: arch, statsmodels


Part IV: Panel Data and Advanced Estimation

Module 7: Panel Data Regression Models – Why panel data: within vs between variation, controlling unobserved heterogeneity – Pooled OLS vs Fixed Effects vs Random Effects: three estimators compared on Grunfeld data – Hausman test: the definitive FE vs RE decision rule – Two-way fixed effects: entity + time — stripping out both firm and year confounds – Dynamic panels: Nickell bias demonstration (ρ=0.092 vs true 0.300), Arellano-Bond GMM recovery – Unbalanced panels and attrition bias – Data: Grunfeld investment (10 firms, 20 years) – Libraries: linearmodels.panel, statsmodels

Module 8: Advanced Estimation Techniques – GMM framework: moment conditions, weighting matrix — OLS, 2SLS, AB as special cases – System GMM vs Difference GMM: efficiency trade-offs, when persistence makes Diff GMM weak – Quantile regression: modelling the entire conditional distribution — not just the mean – Panel quantile regression: Canay (2011) two-step — FE removal then QR – When OLS fails: decision flowchart — effect heterogeneity → quantile, overidentification → GMM – Returns to education across the wage distribution: Q10 = 9.1% → Q90 = 14.2% — education amplifies inequality – Data: Mroz (quantile), simulated dynamic panel (GMM) – Libraries: statsmodels, linearmodels, scipy


Part V: Putting It All Together

Module 9: Hands-on Data Analysis and Modeling in Python – Data cleaning workflow: pandas (merge, melt, pivot, groupby, missing values) – Workflow 1 — Cross-sectional: Mroz wages — full pipeline (load → clean → explore → OLS → diagnostics → interpret) – Workflow 2 — Time series: US GDP growth — stationarity → ARIMA → forecast → evaluation – Workflow 3 — Panel: Grunfeld investment — Pooled/FE/RE/Two-way FE → Hausman → interpret – Technique-Data Matrix: 12 techniques × 3 data types — the FDP cheat sheet – Data: Mroz, macrodata, Grunfeld – Libraries: pandas, statsmodels, linearmodels, pmdarima

Module 10: Reproducible Research and Publication-Ready Outputs – Project structure: data/raw, data/processed, code/, outputs/, paper/ — numbered scripts (01_ to 05_) – Publication-quality tables: summary_col, manual formatted regression tables, significance stars – Publication-quality figures: 300 DPI, vector PDF, readable fonts, greyscale compatibility, four-panel diagnostics – Dynamic documents: Quarto inline code ({python} round(model.params['educ'], 3)) — auto-updating manuscripts – Version control: Git for economists — .gitignore, branches, tags for submission versions – Journal submission checklist: 10-point reviewer checklist mapped to FDP modules – Final capstone: build a complete reproducible research package – Libraries: matplotlib, Git, Quarto


Bonus Modules (Excel Companion)

Bonus 1: ARIMA in Microsoft Excel – Stationarity testing: split-half means, CORREL for autocorrelation, differencing decision (d=1) – AR(1) estimation: LINEST formula, fitted values column, residuals, manual SSE/AIC computation – MA(1) estimation: recursive residual chain, Solver (GRG Nonlinear) — parameters in Col L, residuals in Col M-O – Full ARIMA(1,1,0) walkthrough: 9-step flowchart, complete spreadsheet table, 2-period forecast – Excel vs Python verification: LINEST (-0.91) vs statsmodels (-0.89) — close match – Column layout: A=Quarter, B=Period, C=Sales, D=ΔY, E=ΔY_{t-1}, F=Fitted, G=Residuals

Bonus 2: ARCH & GARCH in Microsoft Excel – Detecting volatility clustering: CORREL of returns vs CORREL of squared returns – ARCH(1): LINEST on squared residuals, σ²_t column, SSE explained (Sum of Squared Errors) – GARCH(1,1): recursive σ²_t column, log-likelihood per observation, Solver maximization – Column layout: M=σ²_t, N=log-likelihood, L=parameters — no overlaps with ARCH columns – Excel vs Python verification: close parameter match


Hands-On Research Module

Hands-On: Cryptocurrency Volatility — ARIMA + ARCH + GARCH Pipeline – Research Question 1 (ARIMA): Can past Bitcoin returns predict future returns? → No — ARIMA(0,0,0), returns are white noise (market efficiency) – Research Question 2 (ARCH): Does yesterday’s volatility predict today’s? → Yes — ARCH-LM=54.2 (p<0.000001), volatility clustering confirmed – Research Question 3 (GARCH): How persistent is volatility after a crash? → Half-life = 5.8 days — α+β=0.888, β=0.726 dominates – Data: BTCUSD daily, 301 trading days (Aug 2025 – Jun 2026), $111K → $64K – Template: change 3 lines to use your own stock/crypto/forex CSV data – Complete hypothesis testing framework: H₁/H₀ stated, evidence tables, step-by-step verdict, final answer – 30 objective questions


Summary Statistics

CategoryCount
Core Modules10
Excel Bonus Modules2
Hands-On Research Module1
Total Quiz Questions200 (Modules) + 30 (Hands-On) = 230
Python Libraries Used15+
Real Datasets Used6 (Mroz, macrodata, Grunfeld, BTCUSD, CPS, PWT)

Leave a Comment