Announcement

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

  • Why does indicating omitted dummy variables not work?

    So I run two Probit regressions with different commands, one is with i(2 3 4 5).c_lable and the other is with o1.c_lable. I expected the same result, but the second command omitted the 5th dummy variable. Is there something wrong in using o?

    . probit strat dum79 teamtreatment ib1.c_lable dum79#i(2 3 4 5).c_lable

    Iteration 0: log likelihood = -2871.1415
    Iteration 1: log likelihood = -2623.3692
    Iteration 2: log likelihood = -2620.9958
    Iteration 3: log likelihood = -2620.9955

    Probit regression Number of obs = 4,752
    LR chi2(10) = 500.29
    Prob > chi2 = 0.0000
    Log likelihood = -2620.9955 Pseudo R2 = 0.0871

    -------------------------------------------------------------------------------
    strat | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    --------------+----------------------------------------------------------------
    dum79 | .2324858 .0894534 2.60 0.009 .0571603 .4078112
    teamtreatment | .3655842 .0417382 8.76 0.000 .2837788 .4473895
    |
    c_lable |
    2 | .6677904 .0843016 7.92 0.000 .5025624 .8330185
    3 | .7539576 .0996171 7.57 0.000 .5587117 .9492034
    4 | .8631431 .0986463 8.75 0.000 .6697999 1.056486
    5 | 1.019718 .0981376 10.39 0.000 .8273721 1.212064
    |
    dum79#c_lable |
    1 2 | -.0783333 .1156842 -0.68 0.498 -.3050703 .1484036
    1 3 | .0716399 .1338501 0.54 0.592 -.1907014 .3339812
    1 4 | .1734201 .1326691 1.31 0.191 -.0866065 .4334468
    1 5 | .149775 .1321952 1.13 0.257 -.1093229 .408873

    |
    _cons | -1.446935 .0687576 -21.04 0.000 -1.581697 -1.312172
    -------------------------------------------------------------------------------

    . probit strat dum79 teamtreatment ib1.c_lable dum79#o1.c_lable

    note: 1.dum79#5.c_lable omitted because of collinearity
    Iteration 0: log likelihood = -2871.1415
    Iteration 1: log likelihood = -2623.3692
    Iteration 2: log likelihood = -2620.9958
    Iteration 3: log likelihood = -2620.9955

    Probit regression Number of obs = 4,752
    LR chi2(10) = 500.29
    Prob > chi2 = 0.0000
    Log likelihood = -2620.9955 Pseudo R2 = 0.0871

    -------------------------------------------------------------------------------
    strat | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    --------------+----------------------------------------------------------------
    dum79 | .3822608 .0979081 3.90 0.000 .1903645 .5741571
    teamtreatment | .3655842 .0417382 8.76 0.000 .2837788 .4473895
    |
    c_lable |
    2 | .6677904 .0843016 7.92 0.000 .5025624 .8330185
    3 | .7539576 .0996171 7.57 0.000 .5587117 .9492034
    4 | .8631431 .0986463 8.75 0.000 .6697999 1.056486
    5 | 1.019718 .0981376 10.39 0.000 .8273721 1.212064
    |
    dum79#c_lable |
    1 1 | -.149775 .1321952 -1.13 0.257 -.408873 .1093229
    1 2 | -.2281084 .1223995 -1.86 0.062 -.468007 .0117902
    1 3 | -.0781351 .1397113 -0.56 0.576 -.3519643 .195694
    1 4 | .0236451 .1385827 0.17 0.865 -.2479719 .2952621
    1 5 | 0 (omitted)

    |
    _cons | -1.446935 .0687576 -21.04 0.000 -1.581697 -1.312172
    -------------------------------------------------------------------------------

  • #2
    Short answer

    Change dum79#o1.c_lable to o0.dum79#o1.c_lable.


    Longer answer

    Note that the variable dum79 is specified as a continuous predictor for the main effect term, but as a factor variable for the interaction term. This makes it difficult for Stata to automatically omit base level combinations for interactions containing this variable. In addition, margins will exit with an error with this model specification, if you try to compute marginal effects with respect to dum79. Better to specify dum79 as a factor in all cases, such as

    Code:
    probit strat b0.dum79 teamtreatment b1.c_lable dum79#i(2 3 4 5).c_lable
    probit strat b0.dum79 teamtreatment b1.c_lable dum79#o1.c_lable
    The first specification does not have a coefficient for 0.dum79#1.c_lable or 1.dum79#1.c_lable. You can see this by adding option allbaselevels.

    The second specification does have these coefficients; however, they are flagged as base/omitted levels of the interaction. You can see this by adding option allbaselevels.

    This change also helped Stata identify which levels of the interaction to omit, given the presence of the main effects.

    The most concise syntax for these equivalent model specifications is
    Code:
    probit strat teamtreatment dum79##c_lable

    Comment


    • #3
      dum79#o1.c_lable
      You need to apply the o. prefix to each factor variable in the interaction. So the above should be

      o1.dum79#o1.c_lable
      Crossed with #2

      Comment


      • #4
        Hi, Jeff and Andrew, Thank you for the detailed answers. I appreciate.

        Comment

        Working...
        X