Tools › Finance and Business › Human Resources › Pay Gap Decomposition › Method
Pay Gap Decomposition: Method
Open the free Pay Gap Decomposition (Oaxaca-Blinder)
The tool takes one row per person (group, pay, and covariates such as grade, tenure or job family) and splits the difference between the mean pay of two groups into a part explained by the entered variables and a part unexplained by them. It shows the arithmetic, the regressions behind it and a standard error for every part. It is a statistical description of the pasted rows, not legal advice, and it draws no conclusion about why the unexplained part is there.
The idea
Suppose pay rises with grade, and group B sits in lower grades than group A. Part of the gap between the two mean pays then comes from the grades the groups are in, and part may remain when people in the same grade are compared. The decomposition measures the two parts. Fit a pay line to each group. Moving group B along a line to the grades of group A gives the explained part; the distance between the two lines at the same grade is the unexplained part.

The equations
For each group the tool regresses y (the logarithm of pay, or pay itself) on the covariates by least squares. Write x̄A, x̄B for the group means of the covariates (with a 1 for the constant) and bA, bB for the two coefficient vectors. Because a least-squares line passes through the means, the mean of y in a group is x̄′b, and the raw gap is R = x̄A′bA − x̄B′bB. Equation numbers are those of Jann (2008).
| Quantity | Formula | Note |
|---|---|---|
| Raw gap | R = ȳA − ȳB = x̄A′bA − x̄B′bB | eq. 1; group A is the reference group |
| Two-fold: explained | Q = (x̄A − x̄B)′ b* | eq. 4; b* are the reference coefficients |
| Two-fold: unexplained | U = x̄A′(bA − b*) + x̄B′(b* − bB) | R = Q + U exactly |
| Reference coefficients | b* = pooled, bA or bB | pooled: one regression of both groups that also carries a group indicator (p. 458); bA: eq. 5; bB: eq. 6 |
| Adjusted gap | coefficient of the group indicator in the pooled regression | equals U when b* is pooled |
| Three-fold | E = (x̄A − x̄B)′bB, C = x̄B′(bA − bB), I = (x̄A − x̄B)′(bA − bB) | eq. 2: endowments, coefficients, interaction; R = E + C + I |
| One covariate's explained part | (x̄jA − x̄jB) b*j | for a set of categories, the sum over its categories with shares in place of means |
| Log pay as a percent | 100 (1 − e−v) | the percent by which pay is lower when its logarithm is lower by v; the parts multiply: e−R = e−Q e−U |
| Variance of a part | g′V(b)g + h′V(x̄)h | first-order (delta-method) variance; g and h are the derivatives of the part with respect to the coefficients and the means (pp. 458–460) |
| Variance of the means | V(x̄) = X̃′X̃ ÷ {n(n − 1)} | X̃ the covariates less their group mean; the means are taken as sampled, not fixed |
| Variance of the coefficients | n/(n − k) × (X′X)−1 [Σ ei² xixi′] (X′X)−1 | heteroskedasticity-robust (HC1); the covariance between a group's coefficients and the pooled ones comes from the same sums over the rows they share |
Log pay or amounts. With the logarithm of pay the coefficients read as percent differences, the means compared are geometric means, and a few very large salaries count for less. With amounts the parts are sums of money and add up to the difference of the arithmetic means. The two can tell different stories on the same rows when pay is skewed.
Categories. A covariate such as grade enters as one indicator column per category, with one category left out of the regression. The explained part of the covariate as a whole does not depend on which category is left out; the unexplained part does. The tool therefore re-expresses the category coefficients as deviations from their mean (the deviation-contrast transform; Jann, 2008, pp. 461–463, after Yun, 2005), which makes the result the same for every choice and equal to the average over all of them.
Which form. The page opens on the two-fold form with pooled coefficients and a group indicator, the form Jann (2008, p. 458) argues for because a pooled regression without the indicator moves part of the unexplained gap into the explained one. The other forms are a click away, and the splits they give can differ.
What it assumes
- Pay (or its logarithm) is a straight-line function of the entered covariates within each group, with one coefficient per number and one per category.
- The rows are independent people, and each group has many more rows than coefficients. The standard errors are large-sample approximations with the normal distribution.
- The covariates are measured the same way in both groups, and pay is on the same basis on every row (all yearly, or all hourly).
- The coefficients and the group means are uncorrelated, which holds when the regression is correctly specified (Jann, 2008, p. 459).
When it misleads
- Left-out variables. The unexplained part carries everything related to pay that differs between the groups and was not entered: performance, hours, scope of the job, location, prior experience. It is a remainder, not a measurement of any one cause.
- Covariates shaped by group. If the groups came to differ in grade or job family for reasons tied to group membership, entering grade moves that part of the gap into "explained". The method cannot tell how a difference in characteristics arose.
- Thin cells. A category with a handful of people in one group gives a coefficient that rests on those few; a category with nobody in a group gives none. The page lists both.
- Small groups. With a few dozen rows the intervals are wide and are themselves approximate. A point estimate with an interval that spans zero is compatible with no gap of that kind in the rows, and with a large one.
- Detail of the unexplained part. Covariate by covariate, the unexplained column depends on where a number's zero lies (tenure counted from 0 or from 100 gives different rows and the same total). Only its total is free of such choices.
- Means only. A zero unexplained gap at the mean can hide gaps of opposite sign in different parts of the pay range.
Common mistakes
- Reading the percentages of a log-pay analysis as additive: 17.2 % explained and −3.4 % unexplained multiply to a 14.4 % gap, they do not sum to it. The figures in logarithms do add.
- Reporting one form as "the" decomposition. Priced with the coefficients of A, of B or of the pooled regression, the same gap splits differently.
- Using a pooled regression without a group indicator for the reference coefficients, which overstates the explained part.
- Entering a grade written 1 to 5 as a number, which forces equal pay steps between grades. List the column under "numbers as categories".
- Mixing pay bases (yearly salaries with hourly rates, full-time with part-time amounts) in one column.
- Reading "share of the gap explained" above 100 % as an error. It means the unexplained part has the opposite sign.
- Calling the unexplained part by the name of a cause. The method names no cause.
Related tools
Adverse Impact Analysis compares selection rates of groups; Overtime and Back Wages computes pay owed under stated rules; Regression and Curve Fitting fits one model to x and y; Difference-in-Differences and ITS compares changes over time. This tool adds the split of a gap in mean pay between two groups into explained and unexplained parts, by covariate, with standard errors.
The tool's test reproduces to the printed digits the four worked examples of Jann (2008, pp. 468–473) on the public data set that accompanies that article (three-fold; pooled two-fold; the exponentiated results; the detailed decomposition with occupational categories; not the standard errors of the one pair of covariates the article reports as a combined set, which the page does not form), and checks every part, coefficient, standard error and interval of the page's cases and of 32 seeded data sets against an independent numpy and scipy computation. The article's examples use the factor N/(N − 1) on the robust matrices; the page uses n/(n − k), which gives slightly wider intervals.
References
Blinder, A. S. (1973). "Wage Discrimination: Reduced Form and Structural Estimates." Journal of Human Resources, Vol. 8, No. 4, pp. 436–455.
Jann, B. (2008). "The Blinder-Oaxaca Decomposition for Linear Regression Models." The Stata Journal, Vol. 8, No. 4, pp. 453–479.
Oaxaca, R. (1973). "Male-Female Wage Differentials in Urban Labor Markets." International Economic Review, Vol. 14, No. 3, pp. 693–709.
Yun, M.-S. (2005). "A Simple Solution to the Identification Problem in Detailed Wage Decompositions." Economic Inquiry, Vol. 43, No. 4, pp. 766–772.