This page sketches the methodology behind ineqx. Three
equations carry the intuition; for the full derivations see Rosche (2026).
1. Descriptive within/between decomposition
Take the vector of individual incomes at time , and the vector of group memberships ( for mutually exclusive groups). The variance of splits cleanly into a within- and a between-group part:
with
the share of group
,
its mean,
its variance, and
the overall mean. Cross sections collapse to a single
.
With repeated cross-sections, the change
further decomposes into contributions from changing means
,
changing dispersions
,
and changing group shares
,
with each component split into its between- and within-group share. This
is what ineqx() returns when no treat is
supplied — it is essentially the Western & Bloome (2009)
decomposition with a Shapley-averaged path.
2. Causal cross-sectional decomposition
Let be a binary treatment, its causal effect on group ’s mean, and its causal effect on group ’s log-SD (so the treated SD is ). The treatment effect on inequality, , splits into a between- and a within-group part, and each of those further splits into a heterogeneity and a covariance term:
The four sub-components have direct substantive readings:
- . Heterogeneity in the treatment effect on the mean always widens between-group inequality. Equal across groups means .
- . Sorting of gains. If positive, larger gains accrue to already-advantaged groups (reinforces the hierarchy). If negative, treatment compresses the hierarchy.
- . The average effect on within-group dispersion. Sign tracks : treatment can stretch or compress within-group spread.
- . Sorting of variance effects. If positive, treatment amplifies dispersion most in already-disperse groups.
plot(<causal>, type = "wibe", stats = c("het_b","cov_b","het_w","cov_w"))
shows these four series directly.
The package supports both (variance) and (squared coefficient of variation) as the underlying inequality measure.
3. Longitudinal three-channel decomposition
With repeated cross-sections, the change in the treatment effect on inequality, , decomposes into three interpretable channels:
- Behavioral — changes in how treatment affects each group’s mean and variance (, ). The Kitagawa-Blinder-Oaxaca “coefficient effect.”
- Compositional — changes in who gets treated across groups (). The KBO “endowment effect.”
- Pre-treatment — changes in the baseline distribution that determine how much a fixed treatment effect translates into inequality (). Has no KBO analogue — this is what the variance-decomposition framing adds.
Sequential decompositions of this kind are path-dependent: the size
of
depends on whether you switch
before or after
.
ineqx() defaults to order = "shapley", which
averages across all
orderings to give an order-invariant decomposition.
plot(<causal>, type = "shapley") displays the Shapley
point estimate and the range across orderings.
4. A note on the variance of logs
ineqx() accepts ystat = "VL" for the
descriptive case (it log-transforms
and runs the standard variance decomposition), but the paper recommends
against
for substantive decomposition work. The reason: because the log
transformation is non-linear, the within- and between-group components
of
can move in the opposite direction from within- and
between-group changes on the income scale. A treatment that
unambiguously raises within-group dispersion in dollars can register as
compressing it in
.
and
do not have this pathology and decompose into components that remain
interpretable on the original income scale. ineqx() issues
a runtime warning whenever ystat = "VL" is used — see the
FAQ for details.