Announcement

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

  • interactions involving dummies resulting from dummy coding categorical variables

    Hello. I am having trouble in understanding what exactly am I contrasting when I use margins r. with interlinked dummies.
    I estimate a multinomial logit with mlogit. There are 4 possible outcomes. Some of the explanatory variables are country dummies and PT is the reference category, the dummy that is omitted. Another explanatory variable is a dummy "female" where 1 is female and 0 is male. I want to analyse the interaction between female and the country dummies to see if the penalty for being a women (in my case I expect a penalty) is different across the countries.
    I compute margins r.female, over (i.ES) to analyse the interaction between female and country ES. I get the following output:
    Code:
     
                    
            Delta-method
                         Contrast    Std. Err.    [95% Conf.    Interval]
                    
    female@_predict#ES    
    (female vs male) 1#0    -.0794763    .0108613    -.100764    -.0581885
    (female vs male) 1#1    -.0801869    .0136789    -.1069969    -.0533768
    (female vs male) 2#0    .0174804    .0075387    .0027049    .0322559
    (female vs male) 2#1    .0327906    .0094481    .0142727    .0513085
    (female vs male) 3#0    .036337    .0069293    .0227559    .0499182
    (female vs male) 3#1    .0192592    .0087216    .0021652    .0363532
    (female vs male) 4#0    .0256588    .0079323    .0101118    .0412059
    (female vs male) 4#1    .0281371    .0090815    .0103376    .0459365
    This gives me the difference between female and male on each outcome for ES and for all other countries except ES? Or the difference between female and male on each outcome for ES and for PT? Or none of this?
    I spent a whole day looking for an example of an interpretation of a similar result and could not find one. I will be very grateful if you can help me!

  • #2
    Paula:
    can't you simply compare your coefficients via -lincom-?
    Code:
    . use https://www.stata-press.com/data/r17/sysdsn1.dta
    (Health insurance data)
    
    . mlogit insure i.nonwhite##i.male
    
    Iteration 0:   log likelihood = -556.59502 
    Iteration 1:   log likelihood = -547.57511 
    Iteration 2:   log likelihood = -547.56884 
    Iteration 3:   log likelihood = -547.56884 
    
    Multinomial logistic regression                         Number of obs =    616
                                                            LR chi2(6)    =  18.05
                                                            Prob > chi2   = 0.0061
    Log likelihood = -547.56884                             Pseudo R2     = 0.0162
    
    -------------------------------------------------------------------------------
           insure | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    --------------+----------------------------------------------------------------
    Indemnity     |  (base outcome)
    --------------+----------------------------------------------------------------
    Prepaid       |
       1.nonwhite |   .7054428   .2401332     2.94   0.003     .2347904    1.176095
           1.male |   .5280474   .2139823     2.47   0.014     .1086497     .947445
                  |
    nonwhite#male |
             1 1  |   .0101772   .5697958     0.02   0.986    -1.106602    1.126957
                  |
            _cons |  -.3273767   .1100836    -2.97   0.003    -.5431365   -.1116168
    --------------+----------------------------------------------------------------
    Uninsure      |
       1.nonwhite |   .5736735   .4458361     1.29   0.198    -.3001492    1.447496
           1.male |   .6010725   .3854798     1.56   0.119     -.154454    1.356599
                  |
    nonwhite#male |
             1 1  |  -.8613556   1.211317    -0.71   0.477    -3.235493    1.512782
                  |
            _cons |   -2.10515   .2162009    -9.74   0.000    -2.528896   -1.681404
    -------------------------------------------------------------------------------
    
    . mat list e(b)
    
    e(b)[1,27]
           Indemnity:    Indemnity:    Indemnity:    Indemnity:    Indemnity:    Indemnity:    Indemnity:    Indemnity:    Indemnity:
                  0b.           1o.           0b.           1o.  0b.nonwhite#  0b.nonwhite#  1o.nonwhite#  1o.nonwhite#            o.
            nonwhite      nonwhite          male          male       0b.male       1o.male       0b.male       1o.male         _cons
    y1             0             0             0             0             0             0             0             0             0
    
             Prepaid:      Prepaid:      Prepaid:      Prepaid:      Prepaid:      Prepaid:      Prepaid:      Prepaid:      Prepaid:
                  0b.            1.           0b.            1.  0b.nonwhite#  0b.nonwhite#  1o.nonwhite#   1.nonwhite#             
            nonwhite      nonwhite          male          male       0b.male       1o.male       0b.male        1.male         _cons
    y1             0     .70544281             0     .52804737             0             0             0     .01017722    -.32737667
    
            Uninsure:     Uninsure:     Uninsure:     Uninsure:     Uninsure:     Uninsure:     Uninsure:     Uninsure:     Uninsure:
                  0b.            1.           0b.            1.  0b.nonwhite#  0b.nonwhite#  1o.nonwhite#   1.nonwhite#             
            nonwhite      nonwhite          male          male       0b.male       1o.male       0b.male        1.male         _cons
    y1             0     .57367353             0     .60107251             0             0             0    -.86135562    -2.1051499
    
    . lincom [Prepaid]1.nonwhite#1.male + [Uninsure]1.nonwhite#1.male
    
     ( 1)  [Prepaid]1.nonwhite#1.male + [Uninsure]1.nonwhite#1.male = 0
    
    ------------------------------------------------------------------------------
          insure | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             (1) |  -.8511784   1.492157    -0.57   0.568    -3.775752    2.073395
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo, Thank you very much for your answer. I realize that I did not explain all that was needed to understand the situation. In fact, the output with the contrasts, above, refers to Contrasts of Predicted Margins. I am not comparing the coefficients of the interaction terms in MNL but the effects on the probabilities of each outcome. I would like to know if the difference between being a male or a female changes the probability of an outcome from country to country. They would be effects within an outcome, not across outcomes.
      Because the dummy for one country is necessarily omitted, I am not sure about the base of comparison in what I get.
      I think that (female vs male) 1#1 in the output above refers to the difference in the probability of outcome 1 between females and males when ES=1 .
      (female vs male) 1#0 then, should be he difference in the probability of outcome 1 between females and males when ES=0 But does this mean when the country is any other except ES? Or is it somehow comparing with PT, because PT is the country whose dummy was ommited?

      Comment

      Working...
      X