Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interpretation of triple interaction of dummy variables in a reghdfe model with fixed effects

    Hi,

    I have estimated the following specification including a triple interaction of 3 dummies:

    Code:
    reghdfe lamount_converted i.worker_female##i.after_rq_change##i.payment_proposal, absorb(i.posted i.cno i.ono i.cat i.wno i.eno i.pno) vce(cluster pno)
    where worker_female takes value 1 for female workers; after_rq_change takes value 1 after a policy intervention in the platform under analysis and payment_proposal takes value 1 if the employer reveals the budget in that specific job. The dependent variable is the log value of a proposal made by a given worker in the platform to a specific project.

    The fixed effects included in the absorb option capture the main effects of the 3 dummies. Hence, the output looks like this:


    Code:
    . reghdfe lamount_converted i.worker_female##i.after_rq_change##i.payment_proposal, absorb(i.posted i.cno i.ono i.cat i.wno i.eno i.pno) vce(cluster pno)
    (dropped 64511 singleton observations)
    note: 1bn.worker_female is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
    note: 1bn.after_rq_change is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
    note: 1bn.payment_proposal is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
    note: 1bn.after_rq_change#1bn.payment_proposal is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
    (MWFE estimator converged in 21 iterations)
    note: 1.worker_female omitted because of collinearity
    note: 1.after_rq_change omitted because of collinearity
    note: 1.payment_proposal omitted because of collinearity
    note: 1.after_rq_change#1.payment_proposal omitted because of collinearity
    
    HDFE Linear regression                            Number of obs   =  2,600,850
    Absorbing 7 HDFE groups                           F(   3, 202376) =      13.99
    Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                      R-squared       =     0.7636
                                                      Adj R-squared   =     0.7264
                                                      Within R-sq.    =     0.0000
    Number of clusters (pno)     =    202,377         Root MSE        =     0.6357
    
                                                                    (Std. err. adjusted for 202,377 clusters in pno)
    ----------------------------------------------------------------------------------------------------------------
                                                   |               Robust
                                 lamount_converted | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -----------------------------------------------+----------------------------------------------------------------
                                     worker_female |
                                                0  |          0  (base)
                                                1  |          0  (omitted)
                                                   |
                                   after_rq_change |
                                                0  |          0  (base)
                                                1  |          0  (omitted)
                                                   |
                     worker_female#after_rq_change |
                                              1 1  |  -.0000105   .0043705    -0.00   0.998    -.0085766    .0085556
                                                   |
                                  payment_proposal |
                                                0  |          0  (base)
                                                1  |          0  (omitted)
                                                   |
                    worker_female#payment_proposal |
                                              1 1  |     .00118   .0044597     0.26   0.791    -.0075608    .0099209
                                                   |
                  after_rq_change#payment_proposal |
                                              1 1  |          0  (omitted)
                                                   |
    worker_female#after_rq_change#payment_proposal |
                                            1 1 1  |  -.0176395   .0051821    -3.40   0.001    -.0277963   -.0074827
                                                   |
                                             _cons |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
    ----------------------------------------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------+
     Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------+---------------------------------------|
     posted_date |       731           1         730     |
             cno |       185           1         184     |
             ono |       168           1         167    ?|
             cat |        17           1          16    ?|
             wno |     54622         168       54454    ?|
             eno |     96358         178       96180    ?|
             pno |    202377      202377           0    *|
    -----------------------------------------------------+
    ? = number of redundant parameters may be higher
    * = FE nested within cluster; treated as redundant for DoF computation



    How should I interpret the coefficient of the triple interaction in this case, if the main effects and the double interaction after_rq_change#payment_proposal are dropped due to collinearity with the fixed effects? Is the final effect the sum of the constant plus the triple interaction coefficient plus the remaining double interaction coefficients? I.e, is the final effect equal to 4.997 - 0.017639 + 0.00118 -0.0000105 (the constant plus all non-dropped coefficients)?

    And, regardless of the magnitude, is it right to say that females make lower proposals after the policy change when the budget is revealed as compared to males?

    To better understand the calculation of the magnitude, I have used the margins command. I have added the option noestimcheck because otherwise everthing appears as not estimable due to collinearity with the fixed effects (I followed this post: https://www.statalist.org/forums/for...-fixed-effects). This is the code I use:

    Code:
    margins i.worker_female##i.after_rq_change##i.payment_proposal, atmeans  noestimcheck
    and this is the output:

    Code:
    . margins i.worker_female##i.after_rq_change##i.payment_proposal, atmeans  noestimcheck
    
    Adjusted predictions                                 Number of obs = 2,600,850
    Model VCE: Robust
    
    Expression: Linear prediction, predict()
    At: 0.worker_female    = .8021051 (mean)
        1.worker_female    = .1978949 (mean)
        0.after_rq_change  =  .302415 (mean)
        1.after_rq_change  =  .697585 (mean)
        0.payment_proposal =  .593281 (mean)
        1.payment_proposal =  .406719 (mean)
    
    ----------------------------------------------------------------------------------------------------------------
                                                   |            Delta-method
                                                   |     Margin   std. err.      z    P>|z|     [95% conf. interval]
    -----------------------------------------------+----------------------------------------------------------------
                                     worker_female |
                                                0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                                1  |    4.99284   .0026521  1882.58   0.000     4.987642    4.998038
                                                   |
                                   after_rq_change |
                                                0  |   4.997467   .0004977  1.0e+04   0.000     4.996492    4.998443
                                                1  |   4.996046   .0001896  2.6e+04   0.000     4.995674    4.996417
                                                   |
                     worker_female#after_rq_change |
                                              0 0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                              0 1  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                              1 0  |   4.997852   .0013815  3617.79   0.000     4.995145     5.00056
                                              1 1  |   4.990668   .0035825  1393.08   0.000     4.983646    4.997689
                                                   |
                                  payment_proposal |
                                                0  |   4.997371   .0001939  2.6e+04   0.000     4.996991    4.997751
                                                1  |   4.995169    .000273  1.8e+04   0.000     4.994634    4.995704
                                                   |
                    worker_female#payment_proposal |
                                              0 0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                              0 1  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                              1 0  |   4.997365   .0023799  2099.84   0.000     4.992701     5.00203
                                              1 1  |    4.98624   .0034923  1427.79   0.000     4.979395    4.993085
                                                   |
                  after_rq_change#payment_proposal |
                                              0 0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                              0 1  |   4.997606   .0005981  8355.63   0.000     4.996434    4.998778
                                              1 0  |    4.99737    .000261  1.9e+04   0.000     4.996859    4.997882
                                              1 1  |   4.994113   .0003937  1.3e+04   0.000     4.993342    4.994885
                                                   |
    worker_female#after_rq_change#payment_proposal |
                                            0 0 0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                            0 0 1  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                            0 1 0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                            0 1 1  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                            1 0 0  |   4.997372   .0006993  7146.52   0.000     4.996002    4.998743
                                            1 0 1  |   4.998552   .0039722  1258.37   0.000     4.990767    5.006338
                                            1 1 0  |   4.997362   .0036992  1350.95   0.000     4.990112    5.004612
                                            1 1 1  |   4.980903    .003979  1251.78   0.000     4.973104    4.988701
    ----------------------------------------------------------------------------------------------------------------
    As I understand it, the corresponding marginal effect for the triple interaction is 4.98093, but I don't know how to interpret this. Does it mean that the average proposal of a female after the change when the budget is revealed is 4.981 on average? Given that this margin is lower than all the other marginal effects combining the 3 dummies, does it means that the average proposal of a female after the change when the budget is revealed is lower than in the other 7 possibilities?

    In the context of the analysis, I want to stress that females make lower proposals as compared to males after the change if the budget is revealed. Is this a correct statement? If I want to show this in a report, should I include the entire marginal coefficients table?

    Thank you in advance for your help!
    Estrella

  • #2
    Using i.x I don't think you need the ## just #. That explains the extra junk.

    If you use c.x, then ##.

    Code:
    sysuse auto, clear
    
    g d1 = runiform()>0.5
    g d2 = runiform()>0.5
    g d3 = runiform()>0.5
    
    reg price i.d1#i.d2#i.d3
    margins, over(d1 d2 d3)
    
    reg price c.d1##c.d2##c.d3
    margins, over(d1 d2 d3)


    Comment


    • #3
      Hi George,

      Thank you for your answer. However, I think the ## for the main effects and interactions to be included in the specification, right? If I do only include #, my output looks like this:
      Code:
      . reghdfe lamount_converted i.worker_female#i.after_rq_change#i.payment_proposal, absorb(i.posted i.cno i.ono i.cat i.wno i.eno i.pno) vce(cluster pno)
      (dropped 64511 singleton observations)
      (MWFE estimator converged in 20 iterations)
      note: 1.worker_female#0b.after_rq_change#0b.payment_proposal omitted because of collinearity
      note: 1.worker_female#0b.after_rq_change#1.payment_proposal omitted because of collinearity
      note: 1.worker_female#1.after_rq_change#0b.payment_proposal omitted because of collinearity
      note: 1.worker_female#1.after_rq_change#1.payment_proposal omitted because of collinearity
      
      HDFE Linear regression                            Number of obs   =  2,600,850
      Absorbing 7 HDFE groups                           F(   3, 202376) =      13.99
      Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                        R-squared       =     0.7636
                                                        Adj R-squared   =     0.7264
                                                        Within R-sq.    =     0.0000
      Number of clusters (pno)     =    202,377         Root MSE        =     0.6357
      
                                                                      (Std. err. adjusted for 202,377 clusters in pno)
      ----------------------------------------------------------------------------------------------------------------
                                                     |               Robust
                                   lamount_converted | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
      -----------------------------------------------+----------------------------------------------------------------
      worker_female#after_rq_change#payment_proposal |
                                              0 0 1  |    -.00118   .0044597    -0.26   0.791    -.0099209    .0075608
                                              0 1 0  |   .0000105   .0043705     0.00   0.998    -.0085556    .0085766
                                              0 1 1  |     .01647    .004608     3.57   0.000     .0074384    .0255015
                                              1 0 0  |          0  (omitted)
                                              1 0 1  |          0  (omitted)
                                              1 1 0  |          0  (omitted)
                                              1 1 1  |          0  (omitted)
                                                     |
                                               _cons |   4.993629   .0027961  1785.91   0.000     4.988149     4.99911
      ----------------------------------------------------------------------------------------------------------------
      
      Absorbed degrees of freedom:
      -----------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
      -------------+---------------------------------------|
       posted_date |       731           1         730     |
               cno |       185           1         184     |
               ono |       168           1         167    ?|
               cat |        17           1          16    ?|
               wno |     54622         168       54454    ?|
               eno |     96358         178       96180    ?|
               pno |    202377      202377           0    *|
      -----------------------------------------------------+
      ? = number of redundant parameters may be higher
      * = FE nested within cluster; treated as redundant for DoF computation

      Comment


      • #4
        #3 has all possible combinations, right, it's that some do not occur (Which you see in your original results with most of the effects having the same size).

        I'd check to see if there's a 1 1 1.

        Comment

        Working...
        X