I need to perform a difference-of-means test for overlapping groups--that is, where individuals can be in group A, group B, both, or neither. Using the nlsw88.dta dataset, for example, I want to test whether the mean wage for married individuals is statistically significantly different from the mean wage for individuals living in the South. The tricky part is that some individuals are both married and living in the South.
Is the following approach using regress, suest, and test appropriate? If not, is there a better alternative?
Is the following approach using regress, suest, and test appropriate? If not, is there a better alternative?
Code:
. sysuse nlsw88 (NLSW, 1988 extract) . tab married south // note overlap | lives in south married | 0 1 | Total -----------+----------------------+---------- single | 464 340 | 804 married | 840 602 | 1,442 -----------+----------------------+---------- Total | 1,304 942 | 2,246 . quietly regress wage married . estimates store eq1 . quietly regress wage south . estimates store eq2 . suest eq1 eq2, coeflegend Simultaneous results for eq1, eq2 Number of obs = 2,246 ------------------------------------------------------------------------------ | Coef. Legend -------------+---------------------------------------------------------------- eq1_mean | married | -.4887873 _b[eq1_mean:married] _cons | 8.080765 _b[eq1_mean:_cons] -------------+---------------------------------------------------------------- eq1_lnvar | _cons | 3.499106 _b[eq1_lnvar:_cons] -------------+---------------------------------------------------------------- eq2_mean | south | -1.514791 _b[eq2_mean:south] _cons | 8.402271 _b[eq2_mean:_cons] -------------+---------------------------------------------------------------- eq2_lnvar | _cons | 3.483747 _b[eq2_lnvar:_cons] ------------------------------------------------------------------------------ . test [eq1_mean]married + [eq1_mean]_cons = [eq2_mean]south + [eq2_mean]_cons ( 1) [eq1_mean]married + [eq1_mean]_cons - [eq2_mean]south - [eq2_mean]_cons = 0 chi2( 1) = 17.47 Prob > chi2 = 0.0000
Comment