# How to test (in Stata) whether the gender distribution of employees to jobs differs across two companies?

I have data on several companies where some are headed by a male CEO while others by a female CEO. As you can imagine, the jobs within these companies have different gender compositions. What I am trying to do is compare the gender distribution of employees across jobs for companies led by a male versus a female CEO.

For example - Co A has a FEMALE CEO where Job1 is 40% female, Job2 is 30% female, Job3 is 15% female. Co B has a MALE CEO where Job1 is 60% female, Job2 is 40% female, Job3 is 20% female. Clearly Co B has a greater proportion of female employees, but my question is whether the distribution of female employees across jobs is significantly different for Co A and Co B. What is the appropriate statistical test and command in Stata for testing this?

Assume these jobs are identical for simplicity.

• I don't think this should be closed; it is partly about stata but also raises statistical issues. Commented Feb 12, 2013 at 22:56

If you are willing to assume that all the jobs are identical, then you can do logistic regression. The DV would be "female in job" and the IV would be "female CEO"; you might want other IVs as well (you probably do).

I don't know Stata, so I can't help there.

• Thanks, Peter. This approach does not fit with my analyses since I have female as the IV in other models. I appreciate your help. Commented Feb 13, 2013 at 1:59

If you're willing to treat each job category separately (and maybe use a more stringent threshold for statistical significance to adjust for the multiple comparison problem), take a look at Chris Baum's Stata Tip #63. Another related approach is user-written betafit from SSC. For many of these, the two extremes of no women and all women will pose a problem. The glm way is a notable exception.

For a multivariate approach that can accommodate proportions that don't sum to one, I would think about a Hotelling's T-squared generalized means test (which can be shoe-horned into a regression setting). It's hotelling in Stata. Equivalently, an F-test from a regression of a female CEO dummy on all the proportion variables whose means should be equal across groups. This F-test can be found right under the sample size in Stata's regress output. If you have other controls like industry dummies or if you want more elaborate standard errors, the regression method might be better.

On second thoughts, I am not so sure if using controls and testing only the proportion coefficients is a good idea. Maybe someone can else can comment on this.

• Thank you for your responses. @Dimitry I want to be sure my explanation is clear. My hope is not to compare whether the %Female in Job1 differs for those working in a firm led by a male versus a female CEO. Rather, I want to compare the % female in each of the three jobs simultaneously. Picture a histogram with % female on the y and jobs on the x axis for male CEOs and another for female CEOs. I would like to test whether this distribution (or pattern) differs for firms led by male versus female CEOs. Commented Feb 13, 2013 at 1:58
• The Hotelling is a joint test of whether a set of means is equal between two types of firms. It doesn't compare the entire distributions. Do the proportions look like they are normally distributed? Commented Feb 13, 2013 at 2:44
• no they are not normal - for some jobs the distribution is left skewed (low level jobs have high % female) others are bimodal (peaks at 0 and 1). Maybe I am not understanding how to use hotelling. Also, my test would have to account for the controls I use in other models, and it doesn't look like I can do that with hotelling. Commented Feb 13, 2013 at 2:59
• Non-normality complicates things, and I don't know of a test to compare the entire multivariate distributions in that case. If you decide to test means with the Hotelling-style approach, and your firm proportions are called job1-job3 and you have a binary female_ceo variable, all you have to do is reg female_ceo job1 job2 job3 control1 control2 and test job1 job2 job3. Alternatively, you can use a logit instead of OLS. Then you look at the p-value (Prob > F). This test would declare the means different at (Prob > F)*100% level. Commented Feb 13, 2013 at 19:00
• Does this approach make sense? Commented Feb 15, 2013 at 23:10