Skip to content

Ecosystem Benchmark: R (CRAN), Python, and Stata

This document summarizes the cross-ecosystem audit of health inequality packages across R (CRAN/GitHub), Python (PyPI/GitHub), and Stata (SSC/RePEc, DASP, ADePT, and WHO) that informs ESTHER-ineq.


1. Cross-Language Feature Matrix

Methodological Capability R (CRAN) Stata (SSC / DASP) Python (prior to ESTHER-ineq) ESTHER-ineq (v0.1.0)
Concentration indices (CI, GC, Wagstaff, Erreygers) rineq, SurveyNCD, inequality, ICEHmeasures conindex, concindc, DASP Absent Yes (plus tie-integrated Extended and Symmetric indices)
Influence-function complex survey variance convey (univariate only); absent in rineq::ci lorenz, DASP, rifvar (conindex omits \(\operatorname{Var}(\hat{\mu})\) and rank variance) Absent (svy has no inequality metrics) Yes (vce="if" default + convenient / newey / replicate / bootstrap)
All 21 WHO healthequal / HEAT summary measures healthequal healthequal Absent Yes (grouped tables and complex survey microdata)
Modern epidemiological SII & RII Split across healthequal, ICEHmeasures, PHEindicatormethods Separate siilogit and glm routines Absent Yes (logit_marginal, moreno_betancur, linear, stratum ridits)
Standardization (DSR/SMR Dobson CIs + Need HI) PHEindicatormethods (DSR only); no HI package with SEs dstdize; manual HI scripts Absent Yes (direct_standardize, indirect_standardize, horizontal_inequity)
Reference-invariant Wagstaff decomposition + SEs rineq::contribution (no factor SEs) Ad-hoc scripts Absent Yes (automatic C(...) factor summation + PSU bootstrap SEs)
Bivariate RIF-I-OLS & RIF-Oaxaca decomposition Absent on CRAN (rifreg/ddecompose univariate only) rifireg, rifhdreg / oaxaca_rif Absent Yes (decompose_rif, decompose_oaxaca_rif with IPW option)
Equiplot, curve bands, and funnel plots ICEHmeasures, FunnelPlotR equiplot, lorenz Absent Yes (editorial matplotlib + interactive plotly)
Multilingual (en/es/pt) STROBE-Equity reporting Not integrated Not integrated Absent Yes (Markdown, LaTeX, HTML, Excel, Word + STROBE-Equity note)

2. Key Technical Audit Notes

  1. Python: Existing inequality libraries (inequalipy, IneqPy) provide point estimates with 1D weights only and lack standard errors, complex survey design support, and bounded health inequality metrics. PySAL's inequality and segregation target spatial weights W and ecological tract counts rather than survey microdata. ESTHER-ineq bridges this gap with a self-contained complex survey variance engine and native pandas, polars, and svy.Sample support.
  2. R (CRAN): Packages such as healthequal, ICEHmeasures, SurveyNCD, rineq, convey, and PHEindicatormethods cover specialized slices of the workflow, but lack a unified Influence-Function bridge for bivariate health inequality and bivariate RIF-Oaxaca decompositions.
  3. Stata (SSC): ESTHER-ineq is cross-validated against conindex (O'Donnell et al., 2016), lorenz (Jann, 2016), healthequal (WHO, 2024), and rifhdreg/oaxaca_rif (Ríos-Ávila, 2020), while correcting two legacy issues identified in Stata user-written commands: (a) outcome boundary truncation (0 -> 0.01, 1 -> 0.99) in siilogit, and (b) unweighted, unclustered homoskedastic residual sums of squares inside conindex ..., compare() svy.