Stata code

To decompose inequality measures, including bivariate rank based inequality measures such as the concentration index, the following Stata code and Stata Journal article provides the relevant RIF based tools:

Stata Journal article: https://journals.sagepub.com/doi/pdf/10.1177/1536867X20909690

ssc install rifvar

ssc install oaxaca_rif

Note: RIF based Oaxaca decompositions should follow the approach of Firpo, S. P., Fortin, N. M., & Lemieux, T. (2018). Decomposing wage distributions using recentered influence function regressions. Econometrics, 6(2), 28, using inverse probability weighting to understand the approximation error of RIF regression.

Stata code from Heckley, G., Gerdtham, U. G., & Kjellsson, G. (2016). A general method for decomposing the causes of socioeconomic inequality in health. Journal of health economics, 48, 89-106, superceded by the above, but here for reference:

The following do-file allows estimation of univariate and bivariate versions of the re-centered influence function (RIF) for the Absolute Concentration/Gini index, Concentration (Gini) Index, Erreygers Index, Wagstaff Index, Attainment Relative CI and Shortfall relative CI and their decomposition using OLS with bootstrapped standard errors:

RIF-I-OLS.do

A Stata ado program file and accompanying help file is also available that allows RIF OLS decomposition of the various forms of the concentration index with parametric bootstrapped standard errors. Save this in your Stata ado folder on your computer and type "help rifireg" to get started:

rifireg.ado

Let me know if you would like any features added to the program or find any issues/bugs!