SPB Git

spb/wp29_uqo

Public
2.5 KB · 38 lines markdown
1# F2-smoke-01 — Slope estimate with firm-clustered uncertainty23## Scientific question4Estimate the linear association between an outcome `y` and a regressor `x` in a panel of firms, with valid uncertainty. The estimand is the population slope β in the linear projection y = α + βx + ε, and its sampling uncertainty must account for the fact that observations from the same firm share a common firm-level shock (observations are independent across firms, not within firms).56## Inputs7- `data/panel.csv` — simulated data (this is a synthetic dataset generated for this exercise; it is not observed data). Columns: `firm_id` (integer firm identifier), `x` (regressor, dimensionless), `y` (outcome, dimensionless). One row per firm–observation pair; rows are in random order.89## Information-availability rules10- Use only `data/panel.csv`. No other input exists.1112## Required outputs13- `out/results.json` with the keys:1415| key | type | meaning |16|---|---|---|17| `task_id` | string | "F2-smoke-01" |18| `beta_hat` | number | OLS slope estimate of y on x (with intercept) |19| `alpha_hat` | number | OLS intercept |20| `se_ols` | number | conventional (homoskedastic, non-clustered) OLS standard error of the slope — the naïve baseline |21| `se_cluster` | number | standard error of the slope clustered by `firm_id` |22| `beta_ci_low`, `beta_ci_high` | number | 95% confidence interval for β using the clustered standard error |23| `n_analysed` | integer | observations used |24| `n_clusters` | integer | number of firms |25| `feasibility` | string | "complete", "partial" or "infeasible" |26| `feasibility_reason` | string or null | explanation if not complete |27| `data_issues` | array of {"issue","handling"} | data problems detected and how handled (empty list if none) |28| `n_input_rows` | object | {"panel.csv": rows read} |29| `random_seed` | integer or null | seed used, if any |3031- `out/report.md` with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues.32- `out/analysis.py` — running `~/wp29/venv/bin/python out/analysis.py` from the workspace root must regenerate `out/results.json` from `data/` only, deterministically.33- `out/claims.json` — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].3435## Constraints36- No network access. Python: `~/wp29/venv/bin/python` (numpy, pandas, scipy, statsmodels available). Do not modify `data/`.37- This task is designed to be completed in well under 15 minutes of work.38
Files · 55b92f9bcc679fb8bcbc12d51e0b6519e7f8b07d
Menu

Theme