Skip to main content

Open implementation of the GBD disability-weight estimation pipeline (Salomon et al. 2012/2015): probit on paired comparisons, interval regression on population-health-equivalence responses, logit-space rescaling.

Project description

WelfareWeights Engine

tests DOI PyPI

Install: pip install welfareweights (Python 3.11+)

Open-source tooling to estimate disability weights from survey data. These are the valuations that turn health states into DALYs (disability-adjusted life years) for burden-of-disease work. Eventually we will extend that methodology to health and welfare states that are not yet well modeled.

This is the academic core of the WelfareWeights project. The companion survey platform (welfareweights.com) is managed separately; this repository is the freely reusable engine and its documentation.

Use

from welfareweights.inference import bootstrap_dws

res = bootstrap_dws(pc_df, phe_df, n_boot=200, rng=0)
print(res.weights)  # one row per health state: dw, lo, hi

pc_df holds paired-comparison responses (respondent_id, state_1, state_2, y) and phe_df holds population-health-equivalence responses (respondent_id, state, n_cases, y); the docstrings in pipeline.py define the columns precisely. welfareweights.estimate_dws gives point estimates and diagnostics without the bootstrap, and welfareweights.simulate generates synthetic survey data from the assumed data-generating process if you have none yet — examples/quickstart.py shows the whole loop, truth to recovery, in about fifteen seconds.

Why

DALYs compress an enormous range of human experience into a single number, and the disability weights underneath them are estimated from public surveys using a methodology that most researchers cannot easily reproduce or extend. The goal here is to democratize and open-source that methodology. I want transparent, reproducible, and open code, so weights can be replicated, scrutinized, and computed for new states. This will help people doing burden-of-disease accounting, policy analysis, and welfare measurement more broadly.

Scope

  1. Replicate the gold-standard approach (Salomon et al.) that derives disability weights from paired-comparison and valuation survey data.
  2. Open-source it as a clean, well-documented library with user-friendly guides, so anyone can run survey data through it.
  3. Extend it to estimate weights for states the current instruments miss.

Understand and audit the method

docs/METHODS.md explains the whole estimator (what the survey questions ask, what each stage assumes, why the tricks work, what must be true for the weights to mean anything, and how to attack it), written for people who did econometrics years ago or who know math and code but never took it; methods.pdf is the same document typeset, with full citations and the validation evidence as an appendix (that link opens the PDF in your browser's own viewer, where the hyperlinks work; GitHub's embedded PDF pane does not support links, so use this one rather than browsing to docs/methods.pdf). examples/quickstart.py runs the full pipeline with uncertainty intervals on synthetic data with known true weights, in about fifteen seconds. A browsable index of all of this, with every link opening in a new tab, is at welfareweights.github.io/engine.

Validation

The original survey microdata is not public, so the estimator is validated the hard way instead: known-truth recovery from the assumed data-generating process, metamorphic invariance tests, loud-failure tests for every identification hazard we found in review, a link-robustness cross-check, held-out fit diagnostics, Monte Carlo coverage tests of the bootstrap intervals, a misspecification battery, and a full-scale run at the published GBD 2010 design size (220 states, 14,000 respondents: rank correlation 0.9997, mean error 0.005). The evidence, including the one documented blind spot, is collected in docs/VALIDATION.md; the studies behind it are reproducible from studies/ with recorded seeds.

Status

Early and under active construction. The estimation pipeline is implemented and validated against synthetic data (see above) while we request the original survey data; the roadmap is in ROADMAP.md. Expect interfaces to change. Watch or star the repo to follow along.

License

Two licenses, by artifact type:

Note that raw survey responses are governed by respondent consent and privacy rules, not by these licenses, and are not published here.

Citation

If you use this work, please cite it via the "Cite this repository" button (see CITATION.cff). The concept DOI 10.5281/zenodo.21401783 always resolves to the latest release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

welfareweights-0.1.1.tar.gz (70.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

welfareweights-0.1.1-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

Details for the file welfareweights-0.1.1.tar.gz.

File metadata

  • Download URL: welfareweights-0.1.1.tar.gz
  • Upload date:
  • Size: 70.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for welfareweights-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ebb18ad80630cf204a70042424d17a81470909f29436e66c24c1be7c2f5e085a
MD5 0c97da3e0797faadbe9282c2b445b965
BLAKE2b-256 2f29d6d9d2c29cc9b8b124d82215b7aa9d0c1463d9bb6ee00092225ffade2eba

See more details on using hashes here.

Provenance

The following attestation bundles were made for welfareweights-0.1.1.tar.gz:

Publisher: publish.yml on welfareweights/engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file welfareweights-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: welfareweights-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 48.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for welfareweights-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f31744310389ee009be238b7f050af3db83559709ff66d49bb7955a059fe0d9e
MD5 39383c27e9a19f63dcb591ba05d28f98
BLAKE2b-256 b495853df58b6c642a4c7c2a3936c951af7e05ee6b7eac44c02d68287e27b053

See more details on using hashes here.

Provenance

The following attestation bundles were made for welfareweights-0.1.1-py3-none-any.whl:

Publisher: publish.yml on welfareweights/engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page