Skip to content

Releases: welfareweights/engine

v0.1.1 — audit-response release

Choose a tag to compare

@maxwelfare maxwelfare released this 17 Jul 02:34

Audit-response release. A referee-grade audit of the estimator (four lenses, every finding adversarially verified by execution) found 20 confirmed issues; this release fixes the 11 that matter for correctness and unattended operation, each with a regression test that records the pre-fix behavior verbatim in its docstring.

Highlights:

  • Bootstrap intervals could be silently too narrow. bootstrap_dws resampled respondents by index label, so input tables carrying duplicate index labels (e.g. batches combined with pd.concat without ignore_index=True) mixed rows across respondents in every replicate — identical point estimates, no failures reported, standard errors roughly 30% too small. Resampling is now positional and immune to index shape; output on unique-index input is bit-identical at a fixed seed.
  • Per-state support floor. A state informed by a single respondent could publish a spuriously tight interval. Below-floor states now publish NaN intervals with a loud warning and keep their point estimate; the weights table gains n_resp_pc, n_resp_phe, and supported columns.
  • Exact curvature-gate metric. The anchor-curvature warning mis-sized its impact metric by 5–11% (absolute instead of signed slope), so bends materially above the declared tolerance could pass silently. The metric now equals the exact line-inversion error, verified against brute-force inversion in the suite.
  • Extrapolation diagnostic. The weights table now reports each state's distance outside the PHE anchor range (anchor-span units) and warns past 0.5 spans — the curvature gate cannot see harm beyond the range it measures.
  • Validation front door. All public entry points validate inputs up front with errors naming the frame, column, and cause: fractional y (previously a silently flipped answer), NaN/string values that bypassed or misrouted the statistical guards, empty or all-one-sided inputs that crashed with pandas internals, and mislabeled level values that published degenerate intervals.
  • bootstrap_dws is importable from the package top level; small-n_boot smoke runs no longer raise a false "design is too fragile" error.

Full details in the CHANGELOG. Docs (METHODS, VALIDATION, the typeset methods guide) updated to match.

v0.1.0

Choose a tag to compare

@maxwelfare maxwelfare released this 16 Jul 21:11

First release: the three-stage GBD disability-weight estimator (Salomon et al. 2012 replication) with loud identification gates, respondent-cluster bootstrap (coverage-tested), multi-survey pooling, held-out fit diagnostics, and the full synthetic validation program (recovery, metamorphic, misspecification, power, GBD-2010-scale). Methods guide with citations: https://welfareweights.github.io/engine/methods.pdf - evidence summary in docs/VALIDATION.md, changelog in CHANGELOG.md.