Description Usage Arguments Value Please cite as: Author(s) References See Also Examples
oaxaca
performs a BlinderOaxaca 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 crossgroup differences in explanatory variables and a part that is due to differences in groupspecific coefficients. Economists have used BlinderOaxaca decompositions extensively to study labor market discrimination. In principle, however, the method is appropriate for the exploration of crossgroup 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.
1 
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 BlinderOaxaca 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 BlinderOaxaca decomposition. It decomposes the difference in mean outcomes into three parts:
The list 
twofold 
a list that contains the result of the twofold BlinderOaxaca 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 (2018). oaxaca: BlinderOaxaca Decomposition in R.
R package version 0.1.4. https://CRAN.Rproject.org/package=oaxaca
Dr. Marek Hlavac < mhlavac at alumni.princeton.edu >
Department of Economics, UWC Adriatic, Duino, Italy
Research Fellow, Central European Labour Studies Institute (CELSI), Bratislava, Slovakia
Blinder, Alan S. (1973). Wage Discrimination: Reduced Form and Structural Estimates. Journal of Human Resources, 8(4), 436455.
Cotton, Jeremiah. (1988). On the Decomposition of Wage Differentials. Review of Economics and Statistics, 70(2), 236243.
Efron, Bradley. (1979). Bootstrap Methods: Another Look at the Jackknife. Annals of Statistics, 7(1), 126.
Gardeazabal, Javier and Arantza Ugidos. (2004). More on Identification in Detailed Wage Decompositions. Review of Economics and Statistics, 86(4), 10341036.
Jann, Ben. (2008). The BlinderOaxaca Decomposition for Linear Regression Models. Stata Journal, 8(4), 453479.
Neumark, David. (1988). Employers' Discriminatory Behavior and the Estimation of Wage Discrimination. Journal of Human Resources, 23(3), 279295.
Oaxaca, Ronald L. (1973). MaleFemale Wage Differentials in Urban Labor Markets. International Economic Review, 14(3), 693709.
Oaxaca, Ronald L. and Michael R. Ransom. (1994). On Discrimination and the Decomposition of Wage Differentials. Journal of Econometrics, 61(1), 521.
Reimers, Cordelia W. (1983). Labor Market Discrimination Against Hispanic and Black Men. Review of Economics and Statistics, 65(4), 570579.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  # set random seed
set.seed(03104)
# load data set of Hispanic workers in Chicago
data("chicago")
# perform BlinderOaxaca Decomposition:
# explain differences in log real wages across native and foreignborn 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.