Title

hazdcmp -- multivariate decomposition for hazard rate models

Description

hazdcmp extends the Oaxaca-Blinder decomposition to decompose a group difference
in hazard rates into components reflecting the portion of the difference attributable to group differences in characteristics (endowments)
and to group differences in effects (coefficients) as well as the detailed (multivariate)
decomposition results as described by Powers and Yun (2009).

Input to hazdcmp is assumed to be in the form of split-episode data (see stsplit)
with a binary dependent variable coded 0 for a censored episode and 1 for an event
along with a set of independent variables (including dummy variables for the episode-specific risks)
and an offset. Models are fit without the constant term to accommodate
all the baseline hazard components. Different specifications of the baseline hazard may require
that the user include their own constant term.

Returned results facilitate add-hoc manipulations, such as averaging results from decompositions with different choices of reference group (shown below).

Syntax

hazdcmp depvar indepvars [aw iw pw fw] [, options ] by(groupvar) id(idvar) offset(offvar)

where

by(groupvar) specifies a binary variable coded 0 or 1 identifying the two groups;

id(idvar) specifies the id number associated with the person-level record (see, e.g., stset);

offset(offvar) specifies the required logged exposure time for continuous-time models, i.e., log(_t - _t0) or 0 (or logged time-interval width) for discrete-time models (see, e.g., stsplit);

options

reverse reverse decomposition by swapping groups.

scale(real) multiply coefficients and standard errors by a scaling factor [default scale(1)].

discrete(string) fit a discrete-time hazard model where string is logit or cloglog [default continuous-time (piecewise-constant exponential) hazard model].

aweight, iweight, pweight, and fweights are allowed (see weight); robust and cluster are supported (see robust and cluster).

Example: Hazard Rate Regression Decomposition (continuous and discrete time)

hazdcmp devnt a1-a6 pctsmom nfamtran medu inc1000 nosibs magebir, by(blk) id(iid) offset(logexp) scale(1000)

hazdcmp devnt a1-a6 pctsmom nfamtran medu inc1000 nosibs magebir, by(blk) id(iid) offset(logone) scale(100) discrete(logit)

Example: Averaging over Decompositions with Different Reference Groups

// vignette #1 (combining results of two decompositions with difference reference groups)
// (combining results of two decompositions with difference reference groups)

// model from group A's perspective (group A as standard)
hazdcmp devnt a1-a6 pctsmom nfamtran medu inc1000 nosibs magebir, ///
by(blk) id(iid) offset(logexp) scale(1000)
local vnames "`e(cvarlist)'" // get complete list of varnames

mat bA = e(b)
mat VA = e(V)

// model from group B's perspective (group B as standard)
hazdcmp devnt a1-a6 pctsmom nfamtran medu inc1000 nosibs magebir, ///
by(blk) id(iid) offset(logexp) scale(1000) reverse

mat bB = e(b)
mat VB = e(V)

mata:
b0 = st_matrix("bA")
V0 = st_matrix("VA")
b1 = st_matrix("bB")
V1 = st_matrix("VB")
s = 1000 // scale factor
// sign change for averaging
b = s * (b0 - b1)/2
V = s^2 * (V0 + V1):/4
k = cols(b)
bE = sum(b[1..k/2])
bC = sum(b[k/2..k])
VE = sum(V[1..k/2,1..k/2])
VC = sum(V[k/2..k, k/2..k])
bR = bE, bC, bE + bC
T = VE,VC,(VE + VC)
VR = diag(T)
st_matrix("b", b)
st_matrix("V", V)
st_matrix("bR", bR)
st_matrix("VR", VR)
st_matrix("VR", VR)
end

matrix colnames b = `vnames'
matrix colnames V = `vnames'
matrix rownames V = `vnames'
matrix colnames bR = E C Total
matrix colnames VR = E C Total
matrix rownames VR = E C Total

eret post b V , depname("Averaged")
eret display, cformat(%6.5f) level(95)
eret post bR VR, depname("Total")
eret display, cformat(%6.5f) level(95)

Saved Results

hazdcmp saves the following macros:

e(indvars) a list of independent variables input to hazdcmp (i.e., the model's varlist)

e(depvar) dependent variable

e(scale) scaling value

e(cvarlist) list of coefficient names in output table of hazdcmp

hazdcmp saves the following matrices in e():

e(b) unscaled estimates

e(V) unscaled variance/covariance matrix of estimates

References

Powers, Daniel A. and Myeong-Su Yun (2009). “Multivariate Decomposition for Hazard Rate Models.” Sociological Methodology, 39: 233-263.

Authors

Daniel A. Powers, University of Texas at Austin, dpowers@austin.utexas.edu

Myeong-Su Yun, Inha University, msyun@inha.ac.kr

Hirotoshi Yoshioka, University of Texas at Austin, hiro12@prc.utexas.edu

Also see

Online help for mvdcmp