Mathematical and Statistical Methodology¶
This document details the mathematical formulations implemented in ESTHER-ineq (v0.1.0).
1. Weighted Fractional Ranks and Tie-Exact Integration¶
Let \(y_i\) denote an ordered socioeconomic stratifier and \(w_i \ge 0\) denote the sampling weight (\(W = \sum_{i=1}^n w_i\)). Let \(y_{(1)} < \dots < y_{(K)}\) denote the \(K\) sorted distinct values of \(y\) with population shares \(p_k = \frac{1}{W}\sum_{i \in G_k} w_i\), lower cumulative bounds \(F_{k-1} = \sum_{m=1}^{k-1} p_m\), and upper bounds \(F_k = F_{k-1} + p_k\).
- Midpoint fractional rank (Van Ourti, 2004): Every unit \(i \in G_k\) receives \(R_k = F_{k-1} + \frac{1}{2}p_k \in (0, 1)\), ensuring \(\mathbb{E}_w[R] = \frac{1}{2}\) and strict invariance to row ordering.
- Exact interval integration for nonlinear rank weights (O'Donnell et al., 2016): For any rank-dependent concentration functional with weight antiderivative \(K(u)\) satisfying \(K(0) = K(1) = 0\) and \(k(u) = K'(u)\), the exact average weight over tied group \(G_k\) is: $\(\bar{k}_k = \frac{1}{p_k}\int_{F_{k-1}}^{F_k} k(u)\,du = \frac{K(F_k) - K(F_{k-1})}{p_k}\)$
- Standard: \(K(u) = u^2 - u\), \(k(u) = 2u - 1 \implies \bar{k}_k = 2 R_k - 1\).
- Extended (\(v > 1\)): \(K(u) = u - 1 + (1 - u)^v\), \(k(u) = 1 - v(1 - u)^{v-1}\).
- Symmetric (\(\beta > 1\), Erreygers, Clarke & Van Ourti, 2012): $\(K(u) = 2^{\beta - 2}\lvert u - 0.5\rvert^{\beta} - 0.25\)$ which collapses identically to the standard and Erreygers indices at \(\beta = 2\).
2. Concentration Indices and Exact Influence Functions (IF / RIF)¶
Let \(J(F) = \sum_{k=1}^K s_k \bar{k}_k\) where \(s_k = \frac{1}{W}\sum_{i \in G_k} w_i h_i = p_k \bar{h}_k\). Every concentration index has the form \(I = \omega(\mu_H) \cdot J(F)\):
- Standard (
standard): \(\omega(\mu) = \frac{1}{\mu}\) - Generalized (
generalized): \(\omega(\mu) = 1\) - Modified (
modified): \(\omega(\mu) = \frac{1}{\mu - a_{\min}}\) - Erreygers (
erreygers, bounded \([a, b]\)): \(\omega(\mu) = \frac{4}{b - a}\) - Wagstaff (
wagstaff, bounded \([a, b]\)): \(\omega(\mu) = \frac{b - a}{(b - \mu)(\mu - a)}\)
Exact \(O(N \log N)\) Gâteaux Derivative¶
For any unit \(i \in G_k\), the exact observation-level Influence Function of \(J(F)\) is: $\(\operatorname{IF}_i(J) = C_0 + (h_i - \bar{h}_k)\bar{k}_k + \bar{h}_k k(F_k) + \sum_{m=k+1}^K \bar{h}_m \big[k(F_m) - k(F_{m-1})\big]\)$ where \(C_0 = -\sum_{m=1}^K \bar{h}_m [k(F_m)F_m - k(F_{m-1})F_{m-1}]\), satisfying \(\sum_{i=1}^n w_i \operatorname{IF}_i(J) \equiv 0\). By the product rule: $\(\operatorname{IF}_i(I) = \omega'(\mu_H)(h_i - \mu_H) J + \omega(\mu_H)\operatorname{IF}_i(J), \qquad \operatorname{RIF}_i(I) = \hat{I} + \operatorname{IF}_i(I)\)$
3. Ultimate-Cluster Stratified Survey Variance¶
Given strata \(h = 1, \dots, H\), primary sampling units \(c = 1, \dots, n_h\), sampling fraction \(f_h\), and linearized score contributions \(e_{hci} = \frac{w_{hci}}{W}\psi_{hci}\) (with unconditional domain scaling \(e_{hci}^{(D)} = \mathbb{I}(i \in D)\frac{w_{hci}}{W_D}\psi_{hci}^{(D)}\) preserving all PSUs across subpopulations \(D\)):
with design degrees of freedom \(df = \sum_h n_h - H\).
4. Epidemiological SII and RII¶
logit_marginal(WHOhealthequal/ PelotasICEHmeasures/ G-computation): Fits a survey-weighted Binomial-Logit GLM \(\mathbb{E}[Y \mid R, \mathbf{Z}] = \operatorname{expit}(\alpha + \beta R + \mathbf{Z}'\boldsymbol{\gamma})\), evaluates marginal counterfactual predictions \(\hat{\mu}_1 = \mathbb{E}_w[\operatorname{expit}(\hat{\alpha} + \hat{\beta} + \mathbf{Z}'\hat{\boldsymbol{\gamma}})]\) and \(\hat{\mu}_0 = \mathbb{E}_w[\operatorname{expit}(\hat{\alpha} + \mathbf{Z}'\hat{\boldsymbol{\gamma}})]\), and computes \(\widehat{\text{SII}} = (\hat{\mu}_1 - \hat{\mu}_0)\cdot \text{scale}\) and \(\widehat{\text{RII}} = \hat{\mu}_1 / \hat{\mu}_0\) with Delta-method survey standard errors (and log-scale confidence intervals forRII).moreno_betancur(Moreno-Betancur et al., 2015): Fits an identity-link GLM for additive \(\widehat{\text{SII}} = \hat{\beta}_{\text{SII}}\) and a modified Poisson log-link GLM with survey sandwich standard errors for multiplicative \(\widehat{\text{RII}} = \exp(\hat{\beta}_{\text{RII}})\).
5. Rate Standardization (DSR, SMR) and Horizontal Inequity (HI)¶
- Directly standardized rate (
DSRwith Dobson exact Poisson-Gamma CIs): Using normalized standard weights \(\pi_a\) (\(\sum_a \pi_a = 1\)), \(\widehat{\text{DSR}} = M\sum_a \pi_a (d_a/n_a)\), \(v = \sum_a (\pi_a/n_a)^2 d_a\), and exact Garwood Poisson limits \((D_L, D_U)\) on \(D = \sum_a d_a\): $\(\text{DSR}_{L, U} = \widehat{\text{DSR}} + \sqrt{\frac{M^2 v}{D}}\left(D_{L, U} - D\right)\)$ - Horizontal inequity (
HI, O'Donnell et al., 2008; Gravelle, 2003): Fits \(\mathbb{E}[y_i \mid \mathbf{x}_i, \mathbf{z}_i] = g^{-1}(\alpha + \mathbf{x}_i'\boldsymbol{\beta} + \mathbf{z}_i'\boldsymbol{\gamma})\), predicts need-expected outcomes holding non-need controls at weighted sample means \(\hat{y}_i^X = g^{-1}(\hat{\alpha} + \mathbf{x}_i'\hat{\boldsymbol{\beta}} + \bar{\mathbf{z}}'\hat{\boldsymbol{\gamma}})\), forms \(y_i^{IS} = y_i - \hat{y}_i^X + \bar{y}^X\), and evaluates \(HI = C(y^{IS})\) with Rao–Wu–Yue PSU-level survey bootstrap standard errors.
6. Wagstaff, RIF-I-OLS, and RIF-Oaxaca Decompositions¶
- Wagstaff, van Doorslaer & Watanabe (2003): Automatically sums dummy columns \(k \in \mathcal{C}(F)\) of each categorical factor
C(F)so \(\text{Contribution}_F = \omega(\mu_y)\sum_{k \in \mathcal{C}(F)} \beta_k^m \, GC(x_k)\) is strictly invariant to the omitted base category. - Bivariate
RIF-I-OLS(Heckley, Gerdtham & Kjellsson, 2016) &RIF-Oaxaca(Ríos-Ávila, 2020): Regresses \(\operatorname{RIF}_i\) on \(\mathbf{X}\) and decomposes \(\Delta \hat{I} = \hat{I}_1 - \hat{I}_0 = (\bar{\mathbf{X}}_1 - \bar{\mathbf{X}}_0)'\hat{\boldsymbol{\gamma}}^* + \bar{\mathbf{X}}_1'(\hat{\boldsymbol{\gamma}}_1 - \hat{\boldsymbol{\gamma}}^*)\), with optional propensity-score IPW counterfactual reweighting (reweight=True).