Announcement

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

  • xtmlogit - why does choice of base matter?

    Hello
    Using the new xtmlogit function the choice of base outcome appears to matter where it doesn't (as expected) for mlogit.
    E.g., using the reference manual example (p.330 v18)

    use https://www.stata-press.com/data/r18/estatus
    xtset id
    xtmlogit estatus i.hhchild age hhincome i.hhsigno i.bwinner

    generates a coefficient estimate for "Yes" to hhchild in the "Out_of_Labor_Force" equation (relative to default base of Employed) of .4628125 (this is as per manual)

    Changing the base to "Out_of_Labor_Force"

    xtmlogit estatus i.hhchild age hhincome i.hhsigno i.bwinner, base(1)

    generates a coefficient estimate for Yes to hhchild in the "Employed" equation (relative to the base of Out_of_Labor_Force) of -.4783626 (Model fit statistics (LL) also change)

    If I estimate as mlogit and do the same I get, as expected, just a change in sign for the different base but the same size coefficient.

    Why does choice of base matter to the estimated coefficient in xtmlogit and which estimate is "correct"?

    Thanks
    John
    Stata version 18




  • #2
    The default coefficients in xtmlogit are log relative-risk ratios. You can approximate the change in base coefficient by asking for relative-risk ratios and then taking the reciprocal i.e.,

    $$\frac{RR1}{RR2}= x \Rightarrow \frac{RR2}{RR1} = \frac{1}{x}.$$


    Code:
    use https://www.stata-press.com/data/r18/estatus, clear
    xtset id
    xtmlogit estatus i.hhchild age hhincome i.hhsigno i.bwinner, rrr nolog
    
    di %3.1f 1/exp(_b[Out_of_labor_force:1.hhchild])
    di %3.1f 1/exp(_b[Out_of_labor_force:age])
    
    xtmlogit estatus i.hhchild age hhincome i.hhsigno i.bwinner, rrr nolog base(1)
    Res.:

    Code:
    . xtmlogit estatus i.hhchild age hhincome i.hhsigno i.bwinner, rrr nolog
    
    Random-effects multinomial logistic regression       Number of obs    =  4,761
    Group variable: id                                   Number of groups =    800
    
    Random effects u_i ~ Gaussian                        Obs per group:
                                                                      min =      5
                                                                      avg =    6.0
                                                                      max =      7
    
    Integration method: mvaghermite                      Integration pts. =      7
    
                                                         Wald chi2(10)    = 239.26
    Log likelihood = -4468.8413                          Prob > chi2      = 0.0000
    
    ------------------------------------------------------------------------------------
               estatus |        RRR   Std. err.      z    P>|z|     [95% conf. interval]
    -------------------+----------------------------------------------------------------
    Out_of_labor_force |
               hhchild |
                  Yes  |   1.588535   .1529375     4.81   0.000     1.315367    1.918435
                   age |   .9951866   .0066108    -0.73   0.468     .9823137    1.008228
              hhincome |   .9953188   .0018303    -2.55   0.011     .9917379    .9989127
                       |
               hhsigno |
                  Yes  |   1.643299   .1555288     5.25   0.000     1.365071    1.978235
                       |
               bwinner |
                  Yes  |   .6224501   .0453138    -6.51   0.000     .5396818    .7179121
                 _cons |   .6195525   .1762713    -1.68   0.092     .3547312    1.082074
    -------------------+----------------------------------------------------------------
    Unemployed         |
               hhchild |
                  Yes  |   .9605983   .1148837    -0.34   0.737     .7598739    1.214345
                   age |   1.004274   .0082168     0.52   0.602     .9882974    1.020508
              hhincome |   .9696241   .0025723   -11.63   0.000     .9645956    .9746788
                       |
               hhsigno |
                  Yes  |    1.10164   .1313881     0.81   0.417     .8720079    1.391743
                       |
               bwinner |
                  Yes  |   .7983097   .0759978    -2.37   0.018     .6624275    .9620649
                 _cons |   .9090255   .3189531    -0.27   0.786     .4569955    1.808174
    -------------------+----------------------------------------------------------------
    Employed           |  (base outcome)
    -------------------+----------------------------------------------------------------
                var(u1)|   .8587807   .1090216                      .6696113    1.101392
                var(u2)|   .7370366   .1388917                      .5094287    1.066338
    ------------------------------------------------------------------------------------
    Note: Estimates are transformed only in the first 3 equations to relative-risk ratios.
    Note: _cons estimates baseline relative risk (conditional on zero random effects).
    LR test vs. multinomial logit: chi2(2) = 225.31           Prob > chi2 = 0.0000
    
    Note: LR test is conservative and provided only for reference.
    
    . 
    . 
    . 
    . di %3.1f 1/exp(_b[Out_of_labor_force:1.hhchild])
    0.6
    
    . 
    . di %3.1f 1/exp(_b[Out_of_labor_force:age])
    1.0
    
    . 
    . 
    . 
    . xtmlogit estatus i.hhchild age hhincome i.hhsigno i.bwinner, rrr nolog base(1)
    
    Random-effects multinomial logistic regression       Number of obs    =  4,761
    Group variable: id                                   Number of groups =    800
    
    Random effects u_i ~ Gaussian                        Obs per group:
                                                                      min =      5
                                                                      avg =    6.0
                                                                      max =      7
    
    Integration method: mvaghermite                      Integration pts. =      7
    
                                                         Wald chi2(10)    = 239.25
    Log likelihood = -4444.2336                          Prob > chi2      = 0.0000
    
    ------------------------------------------------------------------------------------
               estatus |        RRR   Std. err.      z    P>|z|     [95% conf. interval]
    -------------------+----------------------------------------------------------------
    Out_of_labor_force |  (base outcome)
    -------------------+----------------------------------------------------------------
    Unemployed         |
               hhchild |
                  Yes  |   .6576517   .0791126    -3.48   0.000     .5195174    .8325145
                   age |   1.009198   .0081773     1.13   0.258     .9932975    1.025353
              hhincome |   .9742804   .0025094   -10.12   0.000     .9693746    .9792111
                       |
               hhsigno |
                  Yes  |   .7179516    .090231    -2.64   0.008     .5611998    .9184867
                       |
               bwinner |
                  Yes  |   1.244707   .1209068     2.25   0.024     1.028926    1.505741
                 _cons |   1.294644    .452887     0.74   0.460      .652209    2.569888
    -------------------+----------------------------------------------------------------
    Employed           |
               hhchild |
                  Yes  |   .6197974   .0605502    -4.90   0.000     .5117913    .7505968
                   age |   1.004037   .0068176     0.59   0.553     .9907632    1.017489
              hhincome |   1.006352   .0019259     3.31   0.001     1.002584    1.010134
                       |
               hhsigno |
                  Yes  |   .6133448   .0584572    -5.13   0.000     .5088358    .7393188
                       |
               bwinner |
                  Yes  |   1.620003   .1189176     6.57   0.000     1.402919    1.870677
                 _cons |   1.391998   .4032238     1.14   0.254     .7889853    2.455888
    -------------------+----------------------------------------------------------------
                var(u2)|    .495083   .1221867                      .3052116    .8030728
                var(u3)|   .9855456   .1155084                      .7832742    1.240051
    ------------------------------------------------------------------------------------
    Note: Estimates are transformed only in the first 3 equations to relative-risk ratios.
    Note: _cons estimates baseline relative risk (conditional on zero random effects).
    LR test vs. multinomial logit: chi2(2) = 274.52           Prob > chi2 = 0.0000
    
    Note: LR test is conservative and provided only for reference.
    You will want to use margins to ease the interpretation of the results. Otherwise, with log-relative risk ratios, you can only comment on the sign and significance of a coefficient.



    Comment


    • #3
      Thanks Andrew for a quick and clear explanation. Makes sense, now.

      I went for RRR as estimating marginal effects with xtmlogit is extremely slow with the estimation I have.

      But, as you state, it does allow a more straight forward interpretation. Thanks again.

      Comment

      Working...
      X