# How to estimate a subclass effect of fixed effect model?

i need help with an econometric question. I have a panel data of stock analysts and their associated investment returns by following their investment recommendations of buy/hold/sell. The data is at the time,analyst level.

I have the following setup:

Returns ~ control1+control2+ISfemale

My variable of interest is on female analysts. However, it is not possible to estimate female as it is time-invariant and clashes with the analyst fixed effect.

In this setup, how do i estimate the coefficient of ISfemale without going to more sophisticated model such as hausman taylor models that requires instruments (it is hard to theoretically find them).

Also, is it scientific to just take the FIXED effect coefficient of female analyst and just average them ? How can i test if it is significantly greater or less than male analysts ?

Any suggestions would be greatly appreciated !

This is a special case of Hausman and Taylor (1981). See Appendix A.1 Special Cases.

Consider the model $$y_{it} = \alpha + x_{it}\beta + z_i \gamma + \eta_i + e_{it}$$, where $$x_{it}$$ contains control1 and control2, and $$z_i$$ is ISfemale.

Case 1: fixed effects

If $$x_{it}$$ and $$z_i$$ are arbitrarily correlated with $$\eta_i$$, you cannot identify $$\gamma$$. This is natural. We cannot identify the gender effect separated from individual effects. It's impossible because $$z_i$$ is correlated with the error term ($$\eta_i + e_{it}$$) unless you have external instruments.

Case 2: $$z$$ is exogenous

If $$x_{it}$$ is arbitrarily correlated with $$\eta_i$$ but $$z_i$$ is assumed to be uncorrelated with $$\eta_i$$ ($$x$$ is HT's $$X_2$$ and $$z$$ is HT's $$Z_1$$), then no problems. You can use $$x_{it} - \bar{x}_i$$ and $$z_i$$ as instruments. For example, you can run an IV regression using $$x_{it}-\bar{x}_i$$ and $$z_i$$:

xtset id year
by id: egen x1bar = mean(x1)
by id: egen x2bar = mean(x2)
gen x1d = x1 - x1bar
gen x2d = x2 - x2bar
ivregress 2sls y (x1 x2 = x1d x2d) z, vce(r) /* cluster se */


The point here is: $$\beta$$ is identified whether or not $$x_{it}$$ is correlated with $$\eta_i$$. Then $$\gamma$$ can be consistently estimated by regressing $$y_{it} - x_{it} \hat\beta$$ on $$z_i$$. And this is OP's approach:

Also, is it scientific to just take the FIXED effect coefficient of female analyst and just average them ? How can i test if it is significantly greater or less than male analysts ?

Case 3 (unrealistic): $$x$$ is exogenous, $$z$$ is correlated with $$\eta_i$$

See HT. But Stata's xthtaylor will fail. It's a bug. Edit xthtaylor.ado if you want.

• Thank you so much for the comments. I might be able to have data that fufill case 3. On case3, may i know why did you call it unrealistic ? I googled around but did not find much about the bug. Any reference is greatly appreciated. And should i do a ivtest following this to confirm validity of HT model ?
– JSS
Jun 16 at 13:13
• Case 3 means that you want to identify the gender effect separately from other time-invariant unobservable characteristics (using x1bar as instruments). That seems too much to me. The instruments would be weak, and HT doesn't do any magic. I would rather include time-invariant control variables that I want to control for like what we do with cross-sectional data. That means that the time-invariant regressors are exogenous. But of course you can do whatever you want. xthtaylor used to be coded strangely so it fails if "Z1" is empty. I don't know what it is like in a recent version. Jun 16 at 13:25