# How to use the Hausman test for gender discrimination?

I am trying to estimate the gender wage gap for male and female office workers in a large Swedish company to test whether there is gender discrimination. The Hausman test rejects the null that the individual fixed effects are random and therefore I cannot rely on pooled OLS or random effects. The problem is that I cannot keep my female dummy in a fixed effects regression because it is not varying over time.

I was suggested to use a Hausman test instead in order to test for discrimination but I really can’t see how this should be used to find a difference in earnings between male and female workers. I was hoping that maybe someone here would understand this advice a bit better. If so, could you please shed some light on this for me?

Either of the two groups (male or female) will have fewer observations. A priori I would guess that this is the female group. So if you run the same regression specification $$y_{it} = \alpha + X‘_{it}\beta + c_i + \epsilon_{it}$$ where $y$ is earnings, $X$ are the same time-variant explantory variables, $c_i$ are the individual fixed effects and $\epsilon$ is a stochastic error, then a difference between the male and female models would imply that there is a different treatment of men and women in terms of wages. The test statistics in this case would be $$H = (\beta_{fem} - \beta_{male})'(Var(\beta_{fem}) - Var(\beta_{male}))(\beta_{fem} - \beta_{male})$$