{"kind":"tool_results","results":[{"call_id":"call_430244","content":{"procedure":"# Instrumental variables\n\n## When an instrument is needed\n\nThe regressor of interest (years of schooling, participation in a course, migration) is chosen by the units\nand correlated with something unobserved (ability, motivation) that also moves the outcome. A regression of\nthe outcome on it (`infer.ols`) or a comparison of participants with non-participants (`infer.ate` on the\nparticipation column) is biased by that selection. Do not run them as the answer.\n\nAn instrument must:\n1. **move the regressor** (relevance - checked by the first stage);\n2. **affect the outcome only through the regressor** (exclusion - argued, not tested);\n3. be **as good as randomly assigned** (a lottery satisfies this by design).\n\n## Which tool\n\n- One binary instrument (an offer, a lottery win) and one binary treatment (took part or not) \u2192\n  `infer.wald_late` with `z=` the offer and `d=` the participation. It reports the intention-to-treat effect,\n  the compliance difference and their ratio, the local average treatment effect for compliers.\n- A continuous instrument (distance), several instruments, or controls \u2192 `infer.iv_2sls` with `endog=` the\n  regressor, `instruments=` the instrument column(s) and `exog=` controls.\n\n## Diagnostics to read\n\n- `first_stage_F` for each endogenous regressor: below the conventional weak-instrument threshold of ten the\n  estimate is unreliable - say so, and do not present it as a finding.\n- The **sign** of the first stage should make sense (more distance, less schooling).\n- `overid_p` when there are more instruments than regressors: a low value casts doubt on exclusion.\n- In `infer.wald_late`, a compliance difference near zero means a weak instrument.\n\n## Reporting\n\nSay whose effect it is: with a randomized offer, the effect of taking part **for compliers**, not for everyone.\nIf the outcome is in logs, restate the coefficient as a percent with `core.scale_effect`, never by hand.","skill":"instrumental-variables","status":"ok"},"is_error":false,"name":"load_skill"}]}