Announcement

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

  • Interaction terms

    Hi,

    I am trying to estimate the effect of the gender gap on unionised wage premiums. I have my dummy variables for 'union' and 'male' (1 = male, 0 = female), with my dependent variable being the log of wage (lnwage).

    When I create a new variable: 'maleunion' to estimate the effect of a male unionised individual compared to a female unionised individual (with added controls) I get a set of results.
    But, when I create an interaction term instead, 'male##union', I get a different overall coefficient for the male unionised wage premium compared to a female unionised wage premium.

    Is anyone able to help me understand why this is?

    Thank you
    Attached Files

  • #2
    Dillan:
    without taking a look at what you coded and the outcome tables Stata gave you back (as per FAQ, that also discourage posting screenshots and welcome the use of CODE delimiters, instead), it is difficul to reply (for me, at any rate) to reply positively.
    A tentative answer is that, in one of your regression, you omitted the conditional main effect of the predictors included in the regression:
    Code:
    . use "C:\Program Files\Stata18\ado\base\a\auto.dta"
    (1978 automobile data)
    
    
    . regress price i.foreign##i.rep78
    note: 1.foreign#1b.rep78 identifies no observations in the sample.
    note: 1.foreign#2.rep78 identifies no observations in the sample.
    note: 1.foreign#5.rep78 omitted because of collinearity.
    
          Source |       SS           df       MS      Number of obs   =        69
    -------------+----------------------------------   F(7, 61)        =      0.39
           Model |    24684607         7  3526372.43   Prob > F        =    0.9049
        Residual |   552112352        61  9051022.16   R-squared       =    0.0428
    -------------+----------------------------------   Adj R-squared   =   -0.0670
           Total |   576796959        68  8482308.22   Root MSE        =    3008.5
    
    -------------------------------------------------------------------------------
            price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
          foreign |
         Foreign  |   2088.167   2351.846     0.89   0.378     -2614.64    6790.974
                  |
            rep78 |
               2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
               3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
               4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
               5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
                  |
    foreign#rep78 |
       Foreign#1  |          0  (empty)
       Foreign#2  |          0  (empty)
       Foreign#3  |  -3866.574   2980.505    -1.30   0.199    -9826.462    2093.314
       Foreign#4  |  -1708.278   2746.365    -0.62   0.536    -7199.973    3783.418
       Foreign#5  |          0  (omitted)
                  |
            _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
    -------------------------------------------------------------------------------
    
    . regress price i.foreign#i.rep78
    note: 1.foreign#1b.rep78 identifies no observations in the sample.
    note: 1.foreign#2.rep78 identifies no observations in the sample.
    
          Source |       SS           df       MS      Number of obs   =        69
    -------------+----------------------------------   F(7, 61)        =      0.39
           Model |    24684607         7  3526372.43   Prob > F        =    0.9049
        Residual |   552112352        61  9051022.16   R-squared       =    0.0428
    -------------+----------------------------------   Adj R-squared   =   -0.0670
           Total |   576796959        68  8482308.22   Root MSE        =    3008.5
    
    -------------------------------------------------------------------------------
            price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
    foreign#rep78 |
      Domestic#2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
      Domestic#3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
      Domestic#4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
      Domestic#5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
       Foreign#1  |          0  (empty)
       Foreign#2  |          0  (empty)
       Foreign#3  |   264.1667   2746.365     0.10   0.924    -5227.529    5755.862
       Foreign#4  |   1696.944   2351.846     0.72   0.473    -3005.863    6399.751
       Foreign#5  |   1728.167   2351.846     0.73   0.465     -2974.64    6430.974
                  |
            _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
    -------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X