Announcement

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

  • interpreting Stata interaction terms

    I am hoping to confirm my interpreting and application of the interaction terms Stata provides when we run the var1##var2##var3 regression format.
    My regression command is
    xtreg ff D1event##D2style##D3rating
    where ff = fund flows. My coefficients look like this
    VARIABLES
    D1event = 1 -9
    D2style = 1 -3
    1.D1event#1.D2style -7
    D3rating = 1 5
    1.D1event#1.D3rating -1
    1.D2 style #1.D3rating -14
    1.D1event#1.D2style#1.D3rating 15
    Constant 22
    I am hoping to confirm that my interpretation and application of the coefficients are correct. My purpose is to:
    1. estimate the unique ff (ie fund flows) associated D2 style fund with a D3rating in a D1 event.
    Given the following outputs, am I correct to interpret the 1.D1event#1.D2 style#1.D3rating coefficient as indicating that 15 is estimated to occur in a D1event (compared to a non-D1event) for a D2style fund (compared to a non D2style fund) if the fund has a D3 rating (compared to not having a D3 rating).
    2. explain how the interaction components fit together. What is the estimated total ff (ie fund flow) for a D2 style fund with a D3rating in a D1 event?
    Is it the sum of all the coefficients? Ie Constant + D1event + D2style + 1.D1event#1.D2style
    D3rating + 1.D1event#1.D3rating + 1.D2 style #1.D3rating + 1.D1event#1.D2style#1.D3rating
    Thank you for your help, Dan

  • #2
    I think interpreting three-way interaction coefficients is hard for anybody to wrap their head around. Use -margins event#style#rating- to get the estimated value of ff in each combination of event style and rating. As for the meaning of the 15 coefficient for 1.D1event#1.D2style#1.D3rating, it is hard to put it into words as it is a difference in differences in differences. I think it's better not to really focus on the coefficients here; work with the -margins- output instead.

    Comment


    • #3
      Thanks Clyde, I'll have a read through https://www.stata.com/manuals13/rmargins.pdf and see if interpreting -margins event#style#rating- helps, thanks, Dan

      Comment


      • #4
        An alternative and complementary way of making sense of three way interactions is to use the tricks discussed in this Stata tip: https://www.stata-journal.com/articl...article=st0250 .

        Consider the model with a three way interaction below:
        Code:
        . // open example data
        . sysuse nlsw88, clear
        (NLSW, 1988 extract)
        
        .
        . // prepare the data
        . gen byte black = race == 2 if !missing(race)
        
        . label variable black "respondent's race"
        
        . label define black 0 "not black" ///
        >                    1 "black"
        
        . label value black black
        
        . gen byte highoc = occupation < 3 if !missing(occupation)
        (9 missing values generated)
        
        . label variable highoc "high occupation"
        
        . label define highoc 1 "higher" ///
        >                     0 "lower"
        
        . label value highoc highoc
        
        
        . label define south 1 "South" 0 "non-South"
        
        . label value south south
        
        .
        . poisson wage ibn.highoc i.highoc#(i.black##i.south), vce(robust) irr nocons
        note: you are responsible for interpretation of noncount dep. variable
        
        Iteration 0:   log pseudolikelihood = -13638.358  
        Iteration 1:   log pseudolikelihood = -7153.0104  
        Iteration 2:   log pseudolikelihood = -7143.3653  
        Iteration 3:   log pseudolikelihood = -7143.3612  
        Iteration 4:   log pseudolikelihood = -7143.3612  
        
        Poisson regression                              Number of obs     =      2,237
                                                        Wald chi2(8)      =   20603.35
        Log pseudolikelihood = -7143.3612               Prob > chi2       =     0.0000
        
        -------------------------------------------------------------------------------------
                            |               Robust
                       wage |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
        --------------------+----------------------------------------------------------------
                     highoc |
                     lower  |   7.170046   .1896684    74.47   0.000     6.807775    7.551595
                    higher  |   11.38247   .3888261    71.20   0.000     10.64534    12.17065
                            |
               highoc#black |
               lower#black  |   1.046585   .0490895     0.97   0.332     .9546616     1.14736
              higher#black  |   1.040409   .1166726     0.35   0.724     .8351213    1.296161
                            |
               highoc#south |
               lower#South  |   .9130233   .0417024    -1.99   0.046     .8348399    .9985285
              higher#South  |   .8572835   .0518683    -2.55   0.011     .7614197    .9652167
                            |
         highoc#black#south |
         lower#black#South  |   .7934442   .0584669    -3.14   0.002     .6867419    .9167254
        higher#black#South  |   .9495724   .1476683    -0.33   0.739     .7000957    1.287949
        -------------------------------------------------------------------------------------
        In this case there is no reference category for the variable highoc, which is possible because we suppressed the constant. We used a poisson with robust standard errors for wage for reasons discussed in https://blog.stata.com/2011/08/22/us...tell-a-friend/ .

        The interpretation is that for people in lower occupations who are white and live in the non-south we expect an hourly wage of 7.17 dollars, while for people in higher occupations who are white and live in the non-south the expected wage is 11.38 dollars. So the main effects of highoc are now both constants.

        In lower occupations in the non-south blacks can expect to earn 5% ((1.05-1)*100%=5%) more than non-blacks (not significant), while in higher occupations in the non-south blacks can expect to earn 4% more than non-blacks

        In lower occupations people from the south can expect to earn 9% less than people from the non-south if they are not black. In higher occupations people from the south can expect to ear 14% less than people from the non-south if they are not black.

        In the south for people with a lower occupation the effect of being black is 21% smaller than in the non-south. So the effect of being black for people with a lower occupation in the south is 1.05*.79=.83, or blacks in the south with lower occupation earn 17% less than non-blacks in the south with lower occupations. This change in effect for black is only 5% for higher occupations.

        We can expand on this trick even more to show directly the effects of being black for all combinations of occupational status and region:


        Code:
        . poisson wage ibn.highoc#ibn.south (i.highoc#i.south)#i.black, vce(robust) irr nocons
        note: you are responsible for interpretation of noncount dep. variable
        
        Iteration 0:   log pseudolikelihood = -13638.358  
        Iteration 1:   log pseudolikelihood = -7153.0104  
        Iteration 2:   log pseudolikelihood = -7143.3653  
        Iteration 3:   log pseudolikelihood = -7143.3612  
        Iteration 4:   log pseudolikelihood = -7143.3612  
        
        Poisson regression                              Number of obs     =      2,237
                                                        Wald chi2(8)      =   20603.35
        Log pseudolikelihood = -7143.3612               Prob > chi2       =     0.0000
        
        -----------------------------------------------------------------------------------------
                                |               Robust
                           wage |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
        ------------------------+----------------------------------------------------------------
                   highoc#south |
               lower#non-South  |   7.170046   .1896684    74.47   0.000     6.807775    7.551595
                   lower#South  |   6.546419   .2437565    50.46   0.000     6.085682    7.042038
              higher#non-South  |   11.38247   .3888261    71.20   0.000     10.64534    12.17065
                  higher#South  |   9.758006   .4872868    45.62   0.000     8.848191    10.76137
                                |
             highoc#south#black |
         lower#non-South#black  |   1.046585   .0490895     0.97   0.332     .9546616     1.14736
             lower#South#black  |    .830407   .0471932    -3.27   0.001     .7428754    .9282523
        higher#non-South#black  |   1.040409   .1166726     0.35   0.724     .8351213    1.296161
            higher#South#black  |   .9879438   .1064409    -0.11   0.910     .7998784    1.220227
        -----------------------------------------------------------------------------------------
        I leave this as an exercise to ascertain that this model is equivalent to the previous model, i.e. that this model is just a different way of saying the exact same thing as the previous model.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment

        Working...
        X