oaxaca | R Documentation |
oaxaca
performs a Blinder-Oaxaca decomposition for linear regression models (Blinder, 1973; Oaxaca, 1973). This statistical method decomposes the difference in the means of outcome variables across two groups into a part that is due to cross-group differences in explanatory variables and a part that is due to differences in group-specific coefficients. Economists have used Blinder-Oaxaca decompositions extensively to study labor market discrimination. In principle, however, the method is appropriate for the exploration of cross-group differences in any outcome variable.
The oaxaca
function allows users to estimate both a threefold and a twofold variant of the decomposition, as described and implemented by Jann (2008). It supports a variety of reference coefficient weights, as well as pooled model estimation. It can also adjust coefficients on indicator variables to be invariant to the choice of the omitted reference category. Bootstrapped standard errors are calculated (e.g., Efron, 1979). The function returns an object of class "oaxaca"
that can be visualized using the plot.oaxaca
method.
oaxaca(formula, data, group.weights = NULL, R = 100, reg.fun = lm, ...)
formula |
a formula that specifies the model that the function will run. Typically, the formula is of the following form: |
data |
a data frame containing the data to be used in the Blinder-Oaxaca decomposition. |
group.weights |
a vector of numeric values between 0 and 1. These values specify the weight given to Group A relative to Group B in determining the reference set of coefficients (Oaxaca and Ransom, 1994). By default, the following weights are included in each estimation:
|
R |
number of bootstrapping replicates for the calculation of standard errors. No bootstrapping is performed when the value of |
reg.fun |
a function that estimates the desired regression model. The function must accept arguments |
... |
additional arguments that will be passed on to the regression function specified by |
oaxaca
returns an object of class "oaxaca"
. The corresponding summary
function (i.e., summary.oaxaca
) returns the same object.
An object of class "oaxaca"
is a list containing the following components:
beta |
a list that contains information about the regression coefficients used in estimating the decomposition. If dummy variables
|
call |
the matched call. |
n |
a list that contains information about the number of observations used in the analysis. It contains the following components:
|
R |
a numeric vector that contains the number of bootstrapping replicates. |
reg |
a list that contains estimated regression objects:
|
threefold |
a list that contains the result of the threefold Blinder-Oaxaca decomposition. It decomposes the difference in mean outcomes into three parts:
The list |
twofold |
a list that contains the result of the twofold Blinder-Oaxaca decomposition. It decomposes the difference in mean outcomes into two parts:
The The list |
x |
a list that contains:
|
y |
a list that contains the mean values of the dependent variable (i.e., the outcome variable). It contains the following components:
|
Hlavac, Marek (2022). oaxaca: Blinder-Oaxaca Decomposition in R.
R package version 0.1.5. https://CRAN.R-project.org/package=oaxaca
Dr. Marek Hlavac < mhlavac at alumni.princeton.edu >
Social Policy Institute, Bratislava, Slovakia
Blinder, Alan S. (1973). Wage Discrimination: Reduced Form and Structural Estimates. Journal of Human Resources, 8(4), 436-455.
Cotton, Jeremiah. (1988). On the Decomposition of Wage Differentials. Review of Economics and Statistics, 70(2), 236-243.
Efron, Bradley. (1979). Bootstrap Methods: Another Look at the Jackknife. Annals of Statistics, 7(1), 1-26.
Gardeazabal, Javier and Arantza Ugidos. (2004). More on Identification in Detailed Wage Decompositions. Review of Economics and Statistics, 86(4), 1034-1036.
Jann, Ben. (2008). The Blinder-Oaxaca Decomposition for Linear Regression Models. Stata Journal, 8(4), 453-479.
Neumark, David. (1988). Employers' Discriminatory Behavior and the Estimation of Wage Discrimination. Journal of Human Resources, 23(3), 279-295.
Oaxaca, Ronald L. (1973). Male-Female Wage Differentials in Urban Labor Markets. International Economic Review, 14(3), 693-709.
Oaxaca, Ronald L. and Michael R. Ransom. (1994). On Discrimination and the Decomposition of Wage Differentials. Journal of Econometrics, 61(1), 5-21.
Reimers, Cordelia W. (1983). Labor Market Discrimination Against Hispanic and Black Men. Review of Economics and Statistics, 65(4), 570-579.
plot.oaxaca
# set random seed set.seed(03104) # load data set of Hispanic workers in Chicago data("chicago") # perform Blinder-Oaxaca Decomposition: # explain differences in log real wages across native and foreign-born groups oaxaca.results.1 <- oaxaca(ln.real.wage ~ age + female + LTHS + some.college + college + advanced.degree | foreign.born, data = chicago, R = 30) # print the results print(oaxaca.results.1) # Next: # - adjust gender and education dummy variable coefficients to make results # invariant to the choice of omitted baseline (reference category) # - include additional weights for the twofold decomposition that give # weights of 0.2 and 0.4 to Group A relative to Group B in the choice # of reference coefficients oaxaca.results.2 <- oaxaca(ln.real.wage ~ age + female + LTHS + some.college + college + advanced.degree | foreign.born | LTHS + some.college + college + advanced.degree, data = chicago, group.weights = c(0.2, 0.4), R = 30) # plot the results plot(oaxaca.results.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.