Dear Statalist,

I am estimating a fixed effects regression with xtreg,fe that includes an interaction between a time-invariant variable (female) and a time-varying variable (divorced).
The dependent variable is self-esteem.
I have omitted the main effect of female as described in the thread below, but Stata is still throwing out a variable due to collinearity.

https://www.statalist.org/forums/for...fe-and-margins

Does anyone know what is wrong? I have run out of things to check . . .

The crosstabs below the regression results seem to indicate that female and divorce are not completely collinear.
They also confirm that female is time-invariant and that divorce varies over time.
The DV has a limited number of different values, but altering that by adding noice (gen esteem_w2 = esteem_w + rnormal()) did not fix the problem.

Note: To focus on the effect of the first divorce, I have followed recommendations by Bruederl.
I dropped people who were divorced in wave 1 as well as person-years after the end of the first divorce spell.

Thanks,

Jeremy



Code:
. xtreg esteem_w i.divorced divorced#i.female, fe 
note: 1.divorced_w#1.female omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =      6,145
Group variable: id                              Number of groups  =      1,761

R-sq:                                           Obs per group:
     within  = 0.0017                                         min =          2
     between = 0.0085                                         avg =        3.5
     overall = 0.0068                                         max =          5

                                                F(2,4382)         =       3.77
corr(u_i, Xb)  = -0.0776                        Prob > F          =     0.0230

-----------------------------------------------------------------------------------
         esteem_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
     1.divorced_w |      0.038      0.056    0.679   0.497       -0.072       0.149
                  |
divorced_w#female |
             0 1  |      0.170      0.075    2.266   0.023        0.023       0.316
             1 1  |      0.000  (omitted)
                  |
            _cons |      1.419      0.041   34.782   0.000        1.339       1.499
------------------+----------------------------------------------------------------
          sigma_u |  .46732402
          sigma_e |   .4427322
              rho |   .5270026   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------
F test that all u_i=0: F(1760, 4382) = 3.57                  Prob > F = 0.0000

. 
end of do-file

. do "C:\Users\reyno113\AppData\Local\Temp\STD3030_000000.tmp"

. tab divorced female if e(sample)

           |        female
divorced_w |         0          1 |     Total
-----------+----------------------+----------
         0 |     2,705      3,152 |     5,857 
         1 |       119        169 |       288 
-----------+----------------------+----------
     Total |     2,824      3,321 |     6,145 



. xttrans female if e(sample)

           |        female
    female |         0          1 |     Total
-----------+----------------------+----------
         0 |    100.00       0.00 |    100.00 
         1 |      0.00     100.00 |    100.00 
-----------+----------------------+----------
     Total |     46.28      53.72 |    100.00 

. 
end of do-file

. do "C:\Users\reyno113\AppData\Local\Temp\STD3030_000000.tmp"

. xttrans divorced if e(sample)

           |      divorced_w
divorced_w |         0          1 |     Total
-----------+----------------------+----------
         0 |     95.50       4.50 |    100.00 
         1 |      0.00     100.00 |    100.00 
-----------+----------------------+----------
     Total |     93.43       6.57 |    100.00