help glmdeco (http://staff.vwi.unibe.ch/kaiser/research.html)

Title

glmdeco -- Detailed Decomposition of Mean Outcome Differentials in
Generalized Linear Models

Syntax

glmdeco depvar indepvars [weight] [if] [in] , group(varname) [options]

group(varname) required. binary indicator for group

link(name) GLM link function

family(name) GLM family

ipw(varname) inverse probability weights

boot activate the bootstrap

iteration(integer) number of bootstrap iterations

subbs(integer) subsample bootstrap

nodetail suppress detailed decomposition

cat1(varlist) dummies belonging to categorical variable 1

... ...

cat5(varlist) dummies belonging to categorical variable 5

cont1(varlist) set 1 of continuous variables

... ...

cont5(varlist) set 5 of continuous variables

approx calculates Yun's approximate detailed decomposition

normcoef normalizes the coefficients of the dummies in the cat
options to be invariant to the choice of the reference group

pweights are allowed; see weight.

Description

glmdeco decomposes the mean differential of the outcome depvar
between group=1 and group=0. Besides the usual aggregate decomposition,
a detailed decompositions is performed to obtain the contributions of individual
covariates to the overall gap (Kaiser, 2013). The counterfacutal is the average
outcome of group 1 that we would observe
if their outcome distribution had been generated by the conditional expectation function
of group 0.

Use the options link(name) and family(name) to fit the GLM
of your choice, see glm for details. Note that these models are
estimated consistently as long as the assumed conditional outcome model is correct.

If covariates include sets of dummies of categorical variables or polynomials of continuous
variables, the user may specify these in the cat- and cont-options, respectively.
In this way, the routine computes the joint contribution of these variables instead of
indiviual contributions.

Options

group(varname) specifies the binary group variable (0/1).

link(name) specifies the link function. Default is identity-link.
See glm for details.

family(name) specifies the family. Default is the Gaussian
family. See glm for details.

ipw(varname) allows the user to specify inverse probability weights (IPW),
which are used in the estimation of the conditional mean models.
In the case of Poisson QML or logit, the IPW defined as P(D=1|X)/(1-P(D=1|X)) produce a doubly robust
estimator. The user is responsible for supplying the correct weights.

boot specifies the option to compute bootstrapped standard errors. Default
is no standard errors.

iteration(integer) specifies the number of bootstrap iterations.
The default is 100.

subbs(integer between 1 and 100) sets the sample size used in the
bootstrap. If the user sets 50, the bootstrap is performed on 50%-subsamples of the
original sample size. This can be useful for large datasets. The default is 100 for samples
<10,000 obs., 120-0.002*N for samples 10,000-50,000 obs. and 20 for samples >50,000 obs.

cat1(varlist) ... cat5(varlist) can take lists of dummy variables
for which the joint contribution is to be computed. Important: the reference group dummy
must be included as the first element of varlist.
For the first list, use cat1(varlist); for the second list, use cat2(varlist);
and so on. Currently, five sets are supported, i.e. up to cat5(varlist).
Variables included in the cat-options should not appear in indepvars.

cont1(varlist) ... cont5(varlist) can contain lists of continuous
variables for which the joint contribution is to be computed. Currently, five sets are supported,
i.e. up to cont5(varlist). This option is useful for combining the effects of polynomial terms, e.g. age and age2.
Variables included in the cont-options should not appear in indepvars.

approx calculates Yun's (2008) approximate detailed decomposition at the sample means
of the covariates.

normcoef normalizes the coefficients of the sets of dummies specified
in the cat-options so that they are invariant to the reference category (cf. Yun 2008).

Example

a nonlinear decomposition of the (arithmetic mean) union wage differential
using a Poisson quasi-maximum-likelihood estimator:

. webuse nlsw88, clear

. g ttl_exp2=ttl_exp^2

. qui tab race, g(drace)

. glmdeco wage south collgrad grade, g(union) boot link(log) f(poi) cont1(ttl_exp*) cat1(drace*)

Saved results

glmdeco saves the following in r():

Scalars

r(Diff) raw difference in mean outcomes

r(ADx) aggregate characteristics effect

r(ADs) aggregate structural effect

r(N1) number of observations in group1

r(N0) number of observations in group0

r(bic1) BIC in model of group 1

r(bic0) BIC in model of group 0

r(r2_m1) pseudo R^2 in model of group 1

r(r2_m0) pseudo R^2 in model of group 0

Matrices

r(M) mean estimates

r(R) decomposition estimates

Macros

r(xlist) list of detailed decomposition terms

r(subsample) size of bootstrap subsamples

Requirements

This command requires the package distinct that you
can find by typing findit distinct

References

Kaiser, B. (2015). Detailed decompositions in nonlinear models.
Applied Economics Letters, 22(1), 25-29.

Yun, Myeong-Su. 2008. Identification problem and detailed Oaxaca decomposition:
a general solution and inference. Journal of economic and social measurement
33.1 (2008): 27-38.

If you use glmdeco in your work, please cite it as follows

Kaiser, B. (2015). Detailed decompositions in nonlinear models.
Applied Economics Letters, 22(1), 25-29.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT WILL THE COPYRIGHT HOLDERS OR THEIR EMPLOYERS, OR ANY OTHER PARTY WHO
MAY MODIFY AND/OR REDISTRIBUTE THIS SOFTWARE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM.

Author

For questions, queries or suggestions, please contact

Boris Kaiser, bo.kaiser@gmx.ch