Week 2 — The OLS Engine

Ordinary least squares in matrix form, its guarantees (Gauss–Markov, FWL), and the three ways the textbook story breaks (heteroskedasticity, clustering, misspecification). See ../../TOC.md for the full plan.

Chapters

  1. Ch 2.1 — OLS in Matrix Form (normal equations, hat matrix, projection)
  2. Ch 2.2 — Gauss–Markov and the Meaning of “Best” (BLUE, unbiased vs. consistent)
  3. Ch 2.3 — The Frisch–Waugh–Lovell Theorem (partialling-out, demeaning = fixed effects)
  4. Ch 2.4 — Heteroskedasticity, Clustering, HC/HAC (robust SEs; Petersen 2009)
  5. Ch 2.5 — Misspecification: OVB, Measurement Error, Functional Form (bridge to causal inference)

Notebooks (../../../notebooks/week-02/)

  • nb2.1 OLS from scratch (NumPy vs. statsmodels) · nb2.2 Gauss–Markov Monte Carlo · nb2.3 FWL residualization · nb2.4 SE flavors on a clustered panel · nb2.5 Biased-estimator lab (OVB & attenuation)
  • All verified to run headless; nb2.4 reproduces the t-stat collapse (classical t≈5.70 → firm-cluster t≈2.19).

Problem sets (solutions in Appendix E)

  • PS 2.1 Matrix-OLS derivations · PS 2.2 Gauss–Markov diagnostics · PS 2.3 FWL partialling-out · PS 2.4 Robust/clustered/HAC SEs · PS 2.5 OVB & measurement error

Lab, mentor, assessment