Skip to content

Fix the weak-instrument simulation in Chapter 8 - #485

Open
AliFozooni wants to merge 1 commit into
matheusfacure:masterfrom
AliFozooni:agent/fix-valid-weak-instrument-simulation
Open

Fix the weak-instrument simulation in Chapter 8#485
AliFozooni wants to merge 1 commit into
matheusfacure:masterfrom
AliFozooni:agent/fix-valid-weak-instrument-simulation

Conversation

@AliFozooni

@AliFozooni AliFozooni commented Aug 15, 2026

Copy link
Copy Markdown

Summary

  • replace the weak-instrument simulation with a valid DGP where the instrument is independent of the omitted confounder and affects the outcome only through treatment
  • hold covariates, instrument, and error draws fixed while varying only the first-stage coefficient
  • report first-stage F statistics, regenerate outputs, and label conventional intervals as unreliable under weak identification
  • separate the just-identified simulation from the distinct many-weak-instruments result
  • replace the blanket OLS-only claim with a precise warning against plugging arbitrary predictions into textbook 2SLS
  • distinguish standard linear 2SLS from nonlinear, GMM, control-function, and machine-learning IV methods with their own theory

Why this matters

The previous simulation generated each proposed instrument from the confounded treatment. That made the instruments descendants of treatment and correlated with the omitted confounder, so the resulting non-convergence illustrated instrument invalidity rather than weak identification.

The revised experiment uses one valid instrument and 50 separate values of its first-stage coefficient. This isolates relevance while preserving exogeneity and exclusion in every design. It plots conventional standard errors and intervals against the corresponding first-stage F statistic, with the true effect shown explicitly.

The implementation guidance now also makes the correct boundary clear: naively replacing the OLS projection with logistic or black-box fitted values changes the estimator and invalidates ordinary 2SLS inference, but OLS is not the only possible IV method when a procedure supplies appropriate moments, assumptions, and inference theory.

Validation

  • executed all modified simulation and plotting cells successfully
  • verified stored execution counts and regenerated outputs
  • built the complete Jupyter Book successfully after the final guidance correction
  • visually checked the rendered equations, table, plots, and surrounding prose
  • validated notebook JSON and checked the diff for whitespace errors

The full build retains one unrelated pre-existing Chapter 21 lexer warning; Chapter 8 builds without warnings.

Closes #426
Closes #441
Closes #468

@AliFozooni
AliFozooni marked this pull request as ready for review August 15, 2026 17:54
@AliFozooni
AliFozooni force-pushed the agent/fix-valid-weak-instrument-simulation branch from 822967b to ffad80e Compare August 15, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant