What problem does it solve?
This Skill helps you estimate causal effects when a regressor is endogenous, producing consistent parameter estimates via Instrumental Variables (IV) and Two-Stage Least Squares (2SLS).
Core Features & Use Cases
- Instrumental-variables estimation (2SLS/LIML): Estimate structural parameters using excluded instruments and included exogenous controls.
- Endogeneity and validity diagnostics: Automatically compute Wu-Hausman endogeneity tests, first-stage weak-instrument checks, and (when over-identified) Sargan-Hansen overidentification tests.
- Practical econometrics workflow: Provide an end-to-end pipeline that compiles results into a diagnostic summary and supports OLS vs IV comparison for intuition.
- Use case: Estimate the causal return to schooling when education is endogenous, using proximity-to-college (or a similar relevance-based instrument) while verifying instrument strength and endogeneity.
Quick Start
Use the iv-2sls skill to estimate IV/2SLS by providing y, an endogenous regressor DataFrame, an instruments DataFrame, and optional exogenous controls.