Instrumental variables
Panel local-projection IV
Panel local-projection IV on a common calendar sample.
The task
Task statement
Read input.csv from the current directory. Its columns are unit (unit identifier), period (calendar period), y (outcome), x (endogenous regressor), and z (excluded instrument). Estimate y responses at h=0,1,2 using 2SLS local projections. Each origin (unit,t) must have that same unit observed at calendar t-1,t,t+1,t+2. Use this common sample for every horizon. For each h, regress y_(t+h) on endogenous x_t, y_(t-1), unit fixed effects, and origin-period fixed effects. Include an intercept and omit one category from each fixed-effect set. The only excluded instrument is z_t. All included exogenous regressors instrument themselves. Report x coefficients as lp_h0,lp_h1,lp_h2. Do not treat adjacent stored rows as adjacent calendar periods. The sample count is the number of retained origin rows.
Data
Deterministic simulated data: unit, period, y, x, z
- Files
- input.csv
Required output
Scored estimates: lp_h0, lp_h1, lp_h2.
Reference output
| Term | Reference estimate | Sample size |
|---|---|---|
lp_h0 | 0.89754606 | 481 |
lp_h1 | 0.16735897 | 481 |
lp_h2 | 0.06590423 | 481 |
A run succeeds when every scored estimate lies within 1 percent or 0.005 of its reference value, whichever is larger. Sample sizes are not scored.
Task success
| Agency condition | Claude Sonnet 4.6 | GPT-5.6 Luna |
|---|---|---|
| Chatbot | 88.3% | 70.0% |
| Self-repair | 96.7% | 91.7% |
| Constrained agent | 100.0% | 93.3% |
- All runs
- 90.0% of 360 runs
- By prompt condition
- Zero-shot 86.7%, One-shot 93.3%
- By software
- Python 91.7%, R 85.8%, Stata 92.5%
Sources
Sources
About this benchmark task
- Method group
- Instrumental variables
- Software
- Stata, R, and Python
- Runs
- 360 runs, ten in each combination of model, software, prompt, and agency condition