Announcement

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

  • Omitting (one) main effect in interaction with dummies

    Dear Statalist members,

    I have a question about omitting main effects in models with an interaction between two dummy variables.

    My question concerns the following paper which uses a DiD model: http://www.sciencedirect.com/science...411000965?np=y

    The model is as follows: Y = x1 + x1*x2, where both x1 and x2 are dummies. Note that the main effect of x2 is omitted. My question is whether this is actually correct and what would change in the interpretation of the coefficients if x2 would be included also as main effect.

    I am aware of this page, but I can’t seem to figure out what it would then mean with only dummies: http://www.ats.ucla.edu/stat/stata/f...ain_effect.htm

    Many thanks.
    Guillem

  • #2
    Guillem might be interested in the following thread http://www.statalist.org/forums/foru...log-regression.
    In general, omitting the "main effect" of an interacted term is not the way to go; however, ther might be exceptions to that rule, which depends on the research field you're engaged.
    Last edited by Carlo Lazzaro; 05 Mar 2016, 10:35.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Well, you don't give us much to go on in your description. The details are in a paywalled article that many of us can't or won't (pay to) access. But thank you for at least providing a link/complete information so that those who would like to, can see it.

      The generic answer to your question is that it depends on the design of the study.

      Ordinarily, a model that includes an interaction term must also include the main effects, and is mis-specified if it doesn't.

      However, difference-in-difference models are typically carried out with longitudinal data. So one has repeated observations on some entities (panels) over time. And to account for the nesting of observations within panels, one ordinarily uses an estimator that implicitly or explicitly includes panel indicators. These are often called "fixed-effects" estimators, and in Stata they are implemented in the -xt- command series (and also in -areg-).

      Regardless of the technical details of the estimator, if the variable x2 remains constant within each panel over time, then it will be colinear with these panel indicators. So even if you explicitly include it in your list of predictors, it will be dropped from the analysis due to colinearity. So this is a circumstance where the variable x2 not only may, but inevitably will, be omitted.

      Comment


      • #4
        Thanks for your replies, Clyde and Carlo. I wish I could just upload the paper but it would probably get me into some trouble.

        Clyde, I see your point about "fixed-effects" estimators. I think this is the case which was discussed here: http://www.statalist.org/forums/foru...n-fe-are-added

        This is not the case in the paper above, however, which just leads me to think that the model is not estimated correctly thus affecting the results. I still have some doubts about the meaning of the interaction coefficient in this case. As explained here, http://www.ats.ucla.edu/stat/stata/f...ain_effect.htm, this might not be necessarily wrong, but the coefficient only shows "simple contrasts". My doubt remains whether in the case of interaction between dummies these "simple contrast" would be any different than the coefficient of the interaction effect by adding the second predictor.

        Thanks again.
        Best,
        Guillem

        Comment


        • #5
          If it's not panel data and if you're willing to work through some algebra, the x1 + x1#x2 model coefficients can be transformed to get you the coefficients from a full-interaction model. Basically, the coefficient for x1 will be the same either way. The x1#x2 term will have two levels, and the difference between them will be the same as you would get for the main effect of x2, and the other will be the sum of the interaction term from the standard (x1 x2 x1#x2) model and the x2 coefficient. For example:

          Code:
          . use http://www.stata-press.com/data/r14/regsmpl.dta
          (NLS Women 14-26 in 1968)
          
          . reg ttl_exp i.black##i.south
          
                Source |       SS           df       MS      Number of obs   =    28,526
          -------------+----------------------------------   F(3, 28522)     =      7.01
                 Model |  454.815686         3  151.605229   Prob > F        =    0.0001
              Residual |  616972.902    28,522   21.631474   R-squared       =    0.0007
          -------------+----------------------------------   Adj R-squared   =    0.0006
                 Total |  617427.717    28,525  21.6451435   Root MSE        =     4.651
          
          ------------------------------------------------------------------------------
               ttl_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
               1.black |  -.3550241   .0934218    -3.80   0.000    -.5381352    -.171913
               1.south |   .0124571   .0693959     0.18   0.858    -.1235621    .1484763
                       |
           black#south |
                  1 1  |   .1340006   .1275926     1.05   0.294     -.116087    .3840881
                       |
                 _cons |   6.287337   .0395587   158.94   0.000       6.2098    6.364873
          ------------------------------------------------------------------------------
          
          . reg ttl_exp i.black i.black#i.south
          
                Source |       SS           df       MS      Number of obs   =    28,526
          -------------+----------------------------------   F(3, 28522)     =      7.01
                 Model |  454.815686         3  151.605229   Prob > F        =    0.0001
              Residual |  616972.902    28,522   21.631474   R-squared       =    0.0007
          -------------+----------------------------------   Adj R-squared   =    0.0006
                 Total |  617427.717    28,525  21.6451435   Root MSE        =     4.651
          
          ------------------------------------------------------------------------------
               ttl_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
               1.black |  -.3550241   .0934218    -3.80   0.000    -.5381352    -.171913
                       |
           black#south |
                  0 1  |   .0124571   .0693959     0.18   0.858    -.1235621    .1484763
                  1 1  |   .1464577   .1070705     1.37   0.171    -.0634055    .3563209
                       |
                 _cons |   6.287337   .0395587   158.94   0.000       6.2098    6.364873
          ------------------------------------------------------------------------------
          
          . display .1464577-.0124571
          .1340006
          But I think most people find this way of looking at things even more baffling than the regular x1 x2 x1#x2 specification, which people routinely get confused by.

          It's important to note that one of the reasons this equivalence/transformability exists is that when the x2 variable is not in the model explicitly, the interaction x1#x2 gets an extra degree of freedom.

          Comment


          • #6
            Thank you Clyde, that makes quite a bit of sense. I wonder if the algebra was actually done in the paper.
            Best,
            Guillem

            Comment


            • #7
              Guillem:
              search for supplemental material in the artilce or ask the Authors directly
              ...if the algebra was actually done in the paper...
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                I like those tricks of ommitting some main effects and including the reference category, as it can make interaction terms sometimes easier to explain: http://maartenbuis.nl/publications/ref_cat.html .

                However, the logic behind a difference in difference design is that the interaction effect is the estimate for the causal effect. So that would be a bad candidate for such tricks.
                ---------------------------------
                Maarten L. Buis
                University of Konstanz
                Department of history and sociology
                box 40
                78457 Konstanz
                Germany
                http://www.maartenbuis.nl
                ---------------------------------

                Comment


                • #9
                  Carlo, unfortunately there is no supplementary material, but I will certainly contact the author. Will post back here if I get any reply.

                  Maarten, thank you for the tip!

                  Best,
                  Guillem

                  Comment


                  • #10
                    Please, help me how to deal with the issue when stat omits interaction variables while running regression(

                    I tried both codes:
                    reg lwage youth exper2 exper i.educ##i.male i.noneduc##i.fem goodhealth urbanity union

                    reg lwage youth exper2 exper educ male educmale goodhealth urbanity union

                    I would be very thankful,
                    Farogat.

                    Comment


                    • #11
                      I'm going to guess that fem is just the opposite of male and that noneduc is just the opposite of educ. In that case, you have introduced redundant (and hence colinear) variables into your model. Such a model is unidentified and can only be estimated by imposing some constraints (typically, by omitting some of the colinear variables.) So I think the solution is to run

                      Code:
                      reg lwage youth exper2 exper i.educ##i.male goodhealth urbanity union
                      If that doesn't solve your problem, then for more advice you should post back showing example data, and the exact code you are running along with the exact output that you get from that code. See FAQ #12 for guidance on the most useful way to show those things in this Forum.

                      By the way, if exper2 is the square of experience, then you should use -c.exper##c.exper- rather than -exper2 exper- in your regression. Similarly it would be best if you put an i. prefix in front of any of the regression variables that is discrete.

                      Comment

                      Working...
                      X