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¶
- 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'sinequalityandsegregationtarget spatial weightsWand ecological tract counts rather than survey microdata.ESTHER-ineqbridges this gap with a self-contained complex survey variance engine and nativepandas,polars, andsvy.Samplesupport. - R (CRAN): Packages such as
healthequal,ICEHmeasures,SurveyNCD,rineq,convey, andPHEindicatormethodscover specialized slices of the workflow, but lack a unified Influence-Function bridge for bivariate health inequality and bivariateRIF-Oaxacadecompositions. - Stata (SSC):
ESTHER-ineqis cross-validated againstconindex(O'Donnell et al., 2016),lorenz(Jann, 2016),healthequal(WHO, 2024), andrifhdreg/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) insiilogit, and (b) unweighted, unclustered homoskedastic residual sums of squares insideconindex ..., compare() svy.