sheafcoef is a post-estimation command that estimates sheaf coefficients (Heise, Sociological Methods and Research 1972). A sheaf coefficient assumes that a block of variables influence the dependent variable through a latent variable. This assumption is not tested, nor is it testable; a sheaf coefficient is just a different way of presenting the results from a model. Its main usefulness is in comparing the relative strength of the influence of several blocks of variables. For example, say we want to know what determines the probability of working non-standard hours (evenings, nights, and weekends) and we have a block of variables representing characteristics of the job and another block of variables representing the family situation of the respondent, and we want to say something about the relative importance of job characteristics versus family situation. In that case one could estimate a logit model with both blocks of variables and optionally some other control variables. After that one can use sheafcoef to display the effects of two latent variables, family background and job characteristics, which are both standardized to have a standard deviation of 1, and can thus be more easily compared.
This package can be installed by typing in Stata: ssc install sheafcoef
Example of sheafcoef after linear regression (regress).
. sysuse nlsw88, clear (NLSW, 1988 extract)
. recode occupation (11/12=4) /// > (9/10=13) (occupation: 28 changes made)
. gen ln_w = ln(wage)
. . xi: reg ln_w i.occupation married never_married i.occupation _Ioccupatio_1-13 (naturally coded; _Ioccupatio_1 omitted)
Source | SS df MS Number of obs = 2237 -------------+------------------------------ F( 10, 2226) = 63.35 Model | 163.475923 10 16.3475923 Prob > F = 0.0000 Residual | 574.447988 2226 .258062888 R-squared = 0.2215 -------------+------------------------------ Adj R-squared = 0.2180 Total | 737.92391 2236 .330019638 Root MSE = .508
------------------------------------------------------------------------------ ln_w | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- _Ioccupati~2 | -.037393 .0423891 -0.88 0.378 -.1205193 .0457334 _Ioccupat~_3 | -.4031364 .0342393 -11.77 0.000 -.4702807 -.335992 _Ioccupati~4 | -.416714 .0544796 -7.65 0.000 -.5235502 -.3098778 _Ioccupati~5 | -.3893045 .0754261 -5.16 0.000 -.5372174 -.2413916 _Ioccupati~6 | -.6254312 .0432514 -14.46 0.000 -.7102485 -.5406139 _Ioccupati~7 | -1.162129 .1003309 -11.58 0.000 -1.358881 -.965377 _Ioccupati~8 | -.7872661 .0414523 -18.99 0.000 -.8685553 -.7059769 _Ioccupat~13 | -.2013315 .0461723 -4.36 0.000 -.2918767 -.1107863 married | -.0382816 .0254315 -1.51 0.132 -.0881534 .0115903 never_marr~d | .0661679 .0397587 1.66 0.096 -.0118002 .144136 _cons | 2.256447 .0344297 65.54 0.000 2.188929 2.323965 ------------------------------------------------------------------------------
. sheafcoef, latent(occ:_I* ; marst:married never_married) ------------------------------------------------------------------------------ ln_w | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- main | occ | .2697449 .01076 25.07 0.000 .2486557 .2908341 marst | .0328888 .0108017 3.04 0.002 .0117178 .0540597 _cons | 2.256447 .0344297 65.54 0.000 2.188966 2.323928 -------------+---------------------------------------------------------------- on_occ | _Ioccupati~2 | -.1386235 .1570388 -0.88 0.377 -.4464138 .1691669 _Ioccupat~_3 | -1.49451 .1122457 -13.31 0.000 -1.714507 -1.274512 _Ioccupati~4 | -1.544845 .1923762 -8.03 0.000 -1.921895 -1.167794 _Ioccupati~5 | -1.443232 .2736307 -5.27 0.000 -1.979538 -.9069258 _Ioccupati~6 | -2.318603 .1308441 -17.72 0.000 -2.575052 -2.062153 _Ioccupati~7 | -4.308252 .3296375 -13.07 0.000 -4.95433 -3.662175 _Ioccupati~8 | -2.918558 .1004224 -29.06 0.000 -3.115382 -2.721734 _Ioccupat~13 | -.7463774 .1686803 -4.42 0.000 -1.076985 -.4157701 -------------+---------------------------------------------------------------- on_marst | married | -1.163971 .6699269 -1.74 0.082 -2.477004 .1490612 never_marr~d | 2.011869 1.016177 1.98 0.048 .0201975 4.00354 ------------------------------------------------------------------------------
Example of sheafcoef after logistic regression (logit).
. sysuse nlsw88, clear (NLSW, 1988 extract)
. recode occupation (11/12=4) /// > (9/10=13) (occupation: 28 changes made)
. . xi: logit union i.occupation married never_married i.occupation _Ioccupatio_1-13 (naturally coded; _Ioccupatio_1 omitted)
Iteration 0: log likelihood = -1042.9642 Iteration 1: log likelihood = -975.1932 Iteration 2: log likelihood = -971.5165 Iteration 3: log likelihood = -971.47941 Iteration 4: log likelihood = -971.47938
Logistic regression Number of obs = 1869 LR chi2(10) = 142.97 Prob > chi2 = 0.0000 Log likelihood = -971.47938 Pseudo R2 = 0.0685
------------------------------------------------------------------------------ union | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _Ioccupati~2 | -1.231961 .2792184 -4.41 0.000 -1.77922 -.6847034 _Ioccupat~_3 | .0040186 .1710536 0.02 0.981 -.3312403 .3392776 _Ioccupati~4 | -.7968121 .3527726 -2.26 0.024 -1.488234 -.1053905 _Ioccupati~5 | -.2280368 .381865 -0.60 0.550 -.9764785 .520405 _Ioccupati~6 | .7034374 .2006473 3.51 0.000 .310176 1.096699 _Ioccupati~7 | -1.807268 1.036585 -1.74 0.081 -3.838937 .2244008 _Ioccupati~8 | -.4631091 .2341959 -1.98 0.048 -.9221246 -.0040937 _Ioccupat~13 | 1.154784 .2058922 5.61 0.000 .7512422 1.558325 married | -.2999145 .133837 -2.24 0.025 -.5622303 -.0375988 never_marr~d | .1737418 .1945748 0.89 0.372 -.2076179 .5551015 _cons | -.9887016 .1719908 -5.75 0.000 -1.325797 -.6516057 ------------------------------------------------------------------------------
. sheafcoef, latent( occ: _I* ; marst: married never_married) ------------------------------------------------------------------------------ union | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- main | occ | .6737403 .0690416 9.76 0.000 .5384212 .8090595 marst | .1754485 .0549909 3.19 0.001 .0676684 .2832286 _cons | -.9887016 .1719908 -5.75 0.000 -1.325797 -.6516057 -------------+---------------------------------------------------------------- on_occ | _Ioccupati~2 | -1.828541 .3288292 -5.56 0.000 -2.473034 -1.184047 _Ioccupat~_3 | .0059647 .2538843 0.02 0.981 -.4916394 .5035687 _Ioccupati~4 | -1.182669 .5093442 -2.32 0.020 -2.180966 -.1843731 _Ioccupati~5 | -.3384639 .566383 -0.60 0.550 -1.448554 .7716264 _Ioccupati~6 | 1.044078 .2996617 3.48 0.000 .4567518 1.631404 _Ioccupati~7 | -2.68244 1.447044 -1.85 0.064 -5.518595 .1537145 _Ioccupati~8 | -.6873704 .3435686 -2.00 0.045 -1.360752 -.0139883 _Ioccupat~13 | 1.713989 .3099484 5.53 0.000 1.106501 2.321477 -------------+---------------------------------------------------------------- on_marst | married | -1.709416 .5142056 -3.32 0.001 -2.71724 -.7015915 never_marr~d | .9902721 1.081978 0.92 0.360 -1.130365 3.110909 ------------------------------------------------------------------------------
. sheafcoef, latent( occ: _I* ; marst: married never_married) eform ------------------------------------------------------------------------------ union | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- main | occ_e | 1.961561 .1354294 14.48 0.000 1.696124 2.226997 marst_e | 1.191781 .065537 18.18 0.000 1.06333 1.320231 _cons_e | .3720595 .0639908 5.81 0.000 .2466398 .4974792 -------------+---------------------------------------------------------------- on_occ | _Ioccupati~2 | -1.828541 .3288292 -5.56 0.000 -2.473034 -1.184047 _Ioccupat~_3 | .0059647 .2538843 0.02 0.981 -.4916394 .5035687 _Ioccupati~4 | -1.182669 .5093442 -2.32 0.020 -2.180966 -.1843731 _Ioccupati~5 | -.3384639 .566383 -0.60 0.550 -1.448554 .7716264 _Ioccupati~6 | 1.044078 .2996617 3.48 0.000 .4567518 1.631404 _Ioccupati~7 | -2.68244 1.447044 -1.85 0.064 -5.518595 .1537145 _Ioccupati~8 | -.6873704 .3435686 -2.00 0.045 -1.360752 -.0139883 _Ioccupat~13 | 1.713989 .3099484 5.53 0.000 1.106501 2.321477 -------------+---------------------------------------------------------------- on_marst | married | -1.709416 .5142056 -3.32 0.001 -2.71724 -.7015915 never_marr~d | .9902721 1.081978 0.92 0.360 -1.130365 3.110909 ------------------------------------------------------------------------------ (_e) indicates the variables whose coefficients have been exponentiated