knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ineqx: Descriptive and causal variance decompositions

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:

data(incdat)
ineqx(treat="X", post="post_X", y="income", ystat="Var", group="female", time="year", ref=1990, dat)

Try the ineqx package in this Shiny app