The ineqx package allows to analyze how inequality in an outcome (e.g., income) splits into inequality within and between groups (e.g., gender). It is possible to decompose inequality at a single point in time and to decompose changes in inequality over time. In addition to this descriptive decomposition, the ineqx packages allows to analyze how treatment effects (i.e., binary predictors) impact within- and between-group inequality and how this effect changes over time.
Existing approaches to analyzing inequality often ignore within-group inequality by solely analyzing mean differences between groups. Approaches that do allow examining both changes in within- and between-group inequality (e.g., Western & Bloome 2009), in turn, are limited in addressing causal questions about why inequality is changing.
Rosche (2022) introduces a novel approach to analyzing how a treatment variable affects both changes in within- and between-group inequality and decomposing these changes into compositional and behavioral effects. The procedure combines a classic variance decomposition with the Kitagawa-Blinder-Oaxaca (KBO) decomposition approach. Compared to KBO, however, the method allows analyzing treatment effects not only on the mean but on the whole conditional distribution.
The ineqx packages implements both the descriptive (Western & Bloome 2009) and causal variance decomposition (Rosche 2022). The package allows decomposing both the variance and the squared coefficient of variation (CV2).
With the ineqx package you can analyze
This is how the
ineqx() function looks like:
I welcome contributions to the package! Feel free to submit changes for review or contact me if you have any questions.
If you would like to log an issue or submit a feature request, please create a new issue or comment on an existing issue on GitHub Issues on this repo.