Announcement

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

  • What's the correct way of interpreting the (exponentiated) log odds?

    Hello everyone,


    I am trying to translate the following output to a table in a word document. However, I am a bit unsure about how to correctly interpret the output. Primarily when looking at the constant.

    I am currently running two tables: one with a baseline of 4 (Green/ecologist parties) and one with 2 (Communist/socialist parties). The dependent variable is political success. In both tables, the output is exponentiated (using ", or"). However, I obviously still want to include both families. How do I do this correctly? Since the output from both tables are vastly different from one another

    Table 1 (Green/ecologist parties as baseline)
    success Odds Ratio Std. Err. z P>z [95% Conf. Interval]
    party_family
    Christian democracy 2.429069 .0834748 25.83 0.000 2.27085 2.598312
    Communist/Socialist .7689889 .026734 -7.56 0.000 .7183365 .8232128
    Conservative 1.256617 .0455363 6.30 0.000 1.170463 1.349112
    Liberal 1.798223 .060369 17.48 0.000 1.68371 1.920523
    Right-wing 2.589988 .1875777 13.14 0.000 2.247244 2.985007
    Social democracy 2.145219 .1034633 15.83 0.000 1.951724 2.357897
    Special issue .5662629 .0364536 -8.83 0.000 .4991389 .6424137
    cabinetnumb .9163369 .0041901 -19.11 0.000 .9081612 .9245862
    seats .9893395 .00136 -7.80 0.000 .9866775 .9920088
    elecsuccess 1.239797 .0307061 8.68 0.000 1.181052 1.301465
    governing 10.3113 .3449301 69.75 0.000 9.656935 11.01001
    _cons .8578049 .0282499 -4.66 0.000 .8041853 .9149996
    Table 2 (communist/socialist as baseline)
    success Odds Ratio Std. Err. z P>z [95% Conf. Interval]
    party_family
    Christian democracy 3.158783 .0983181 36.95 0.000 2.971843 3.357482
    Conservative 1.634116 .0590701 13.59 0.000 1.522347 1.754091
    Green/Ecologist 1.300409 .0452088 7.56 0.000 1.214753 1.392105
    Liberal 2.338425 .0749027 26.52 0.000 2.196131 2.489938
    Right-wing 3.368044 .2450815 16.69 0.000 2.920375 3.884337
    Social democracy 2.789661 .1146532 24.96 0.000 2.573758 3.023676
    Special issue .7363734 .0479969 -4.69 0.000 .6480622 .8367188
    cabinetnumb .9163369 .0041901 -19.11 0.000 .9081612 .9245862
    seats .9893395 .00136 -7.80 0.000 .9866775 .9920088
    elecsuccess 1.239797 .0307061 8.68 0.000 1.181052 1.301465
    governing 10.3113 .3449301 69.75 0.000 9.656935 11.01001
    _cons .6596424 .0258202 -10.63 0.000 .6109283 .7122409
    Last edited by Toon Zegers; 13 Jun 2019, 02:06.

  • #2
    The correct way to interpret odds ratio is displayed in several texts. But it seems that the issue here is the reference group. If you change the reference group, the odds ratio of each group will be compared to the reference, hence the difference in the results.

    Please see the output below, just changing the reference group of race:

    Code:
    . webuse lbw
    (Hosmer & Lemeshow data)
    
    .  logistic low age lwt i.race smoke ptl ht ui
    
    Logistic regression                             Number of obs     =        189
                                                    LR chi2(8)        =      33.22
                                                    Prob > chi2       =     0.0001
    Log likelihood =   -100.724                     Pseudo R2         =     0.1416
    
    ------------------------------------------------------------------------------
             low | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .9732636   .0354759    -0.74   0.457     .9061578    1.045339
             lwt |   .9849634   .0068217    -2.19   0.029     .9716834    .9984249
                 |
            race |
          black  |   3.534767   1.860737     2.40   0.016     1.259736    9.918406
          other  |   2.368079   1.039949     1.96   0.050     1.001356    5.600207
                 |
           smoke |   2.517698    1.00916     2.30   0.021     1.147676    5.523162
             ptl |   1.719161   .5952579     1.56   0.118     .8721455    3.388787
              ht |   6.249602   4.322408     2.65   0.008     1.611152    24.24199
              ui |     2.1351   .9808153     1.65   0.099     .8677528      5.2534
           _cons |   1.586014   1.910496     0.38   0.702     .1496092     16.8134
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.
    
    .  logistic low age lwt ib2.race smoke ptl ht ui
    
    Logistic regression                             Number of obs     =        189
                                                    LR chi2(8)        =      33.22
                                                    Prob > chi2       =     0.0001
    Log likelihood =   -100.724                     Pseudo R2         =     0.1416
    
    ------------------------------------------------------------------------------
             low | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .9732636   .0354759    -0.74   0.457     .9061578    1.045339
             lwt |   .9849634   .0068217    -2.19   0.029     .9716834    .9984249
                 |
            race |
          white  |   .2829041   .1489236    -2.40   0.016     .1008227     .793817
          other  |   .6699393   .3609569    -0.74   0.457     .2330324    1.925993
                 |
           smoke |   2.517698    1.00916     2.30   0.021     1.147676    5.523162
             ptl |   1.719161   .5952579     1.56   0.118     .8721455    3.388787
              ht |   6.249602   4.322408     2.65   0.008     1.611152    24.24199
              ui |     2.1351   .9808153     1.65   0.099     .8677528      5.2534
           _cons |   5.606189   7.070615     1.37   0.172     .4732807    66.40743
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.
    
    .  logistic low age lwt ib3.race smoke ptl ht ui
    
    Logistic regression                             Number of obs     =        189
                                                    LR chi2(8)        =      33.22
                                                    Prob > chi2       =     0.0001
    Log likelihood =   -100.724                     Pseudo R2         =     0.1416
    
    ------------------------------------------------------------------------------
             low | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .9732636   .0354759    -0.74   0.457     .9061578    1.045339
             lwt |   .9849634   .0068217    -2.19   0.029     .9716834    .9984249
                 |
            race |
          white  |   .4222832    .185447    -1.96   0.050     .1785648    .9986461
          black  |   1.492672   .8042376     0.74   0.457     .5192127     4.29125
                 |
           smoke |   2.517698    1.00916     2.30   0.021     1.147676    5.523162
             ptl |   1.719161   .5952579     1.56   0.118     .8721455    3.388787
              ht |   6.249602   4.322408     2.65   0.008     1.611152    24.24199
              ui |     2.1351   .9808153     1.65   0.099     .8677528      5.2534
           _cons |   3.755806   4.149787     1.20   0.231     .4307362    32.74877
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.
    Since the constant concerns the "baseline odds", i.e., the odds ratio when all predictors are set to zero, and considering the reference group (zero, so to speak) for race was changed, the constant must change as well

    Hopefully that helps
    Last edited by Marcos Almeida; 13 Jun 2019, 06:37.
    Best regards,

    Marcos

    Comment


    • #3
      Hello Toon. If you are after all pairwise odds ratios, you can get them with -contrast- commands. This follows on from the examples Marcos gave in #2.

      Code:
      clear *
      webuse lbw
      
      // ssc describe fre //
      fre race
      logit low age lwt i.race smoke ptl ht ui
      logit, or
      
      pwcompare race, eform // All pairwise ORs
      
      contrast { race 1 -1 0 }, nowald effects eform // White - Black
      contrast { race -1 1 0 }, nowald effects eform // Black - White
      // From table of coefficients:  OR = 3.534767 (1.259736 to 9.918406)
      
      contrast { race 1 0 -1 }, nowald effects eform // White - Other
      contrast { race -1 0 1 }, nowald effects eform // Other - White
      // From table of coefficients:  OR = 2.368079 (1.001356 to 5.600207)
      
      contrast { race 0 1 -1 }, nowald effects eform // Black - Other
      contrast { race 0 -1 1 }, nowald effects eform // Other - Black
      Notice that two of the custom contrasts match the odds ratios (and 95% CIs) for race in the table of coefficients.

      HTH.
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        I think i was a bit unclear. I know how to interpret the log odds but am more or less unclear about how to interpret them seeing as their values change depending on the baseline. It was a bit unclear to me which value to use. Am I understand this correctly that if i just keep changing the baseline to another party family (1 through 7) that I just can take the constant values?

        Comment


        • #5
          It is still unclear to me what is exactly unclear to you. Your output does not contain log odds but odds ratios (for all variables) and odds (for your constant). The fact that odds ratios change when the reference category changes is discussed above, but if I interpret you correctly it seems that it is still unclear to you. Can you tell us in more detail what it is that is unclear to you? Maybe it helps if you explain why the answers above did not help you.
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #6
            Hey Maarten thanks for your reply.


            Maybe I am just missing something. I want to put the data from the output in a table for a paper. However, having a constant does not really make the data all too easy to interpret. I just gives us the likelihood of party family X being successful in comparison to the baseline. I much rather showcase the likelihood of party family X having success (dependent variable) compared to zero/no success. That's why I wondered in post #4 if I should just run the model for every baseline and just put the baselines in the table.

            Comment


            • #7
              Ok I see what you want. You are probably looking for this Stata Tip: https://www.stata-journal.com/articl...article=st0250

              As much as I like that, you will need to be very careful in your discussion of the results. Many readers have enough trouble with odds ratios. Now you are mixing odds and odds ratios in your output table. You can do it - I would probably do it - but it takes some careful writing and careful design of the table as most readers are not used to interpreting models without the constant and indicator variables without a reference category. You need to make a decision whether that possible confusion is worth it. Remember that most of your potential readers will not read your article very carefully. The risk is that they will skim the article, see a table with indicator variables without a reference, decide that the author does not know what he is doing, and start reading another article.

              An alternative would be to look at the contrast command with the gw. prefix. That way you can compare each party family with the grand mean. This is another way of not having to choose a reference category, but this has the problem of having to imagine what an "average party family" would be.
              ---------------------------------
              Maarten L. Buis
              University of Konstanz
              Department of history and sociology
              box 40
              78457 Konstanz
              Germany
              http://www.maartenbuis.nl
              ---------------------------------

              Comment


              • #8
                Hey Maarten,

                Thank you so much for your reply. What you were saying was in fact exactly what I was meaning to do and now I know how. I'll make sure to thoroughly mention how I came to my results. Again, thank you!

                Comment


                • #9
                  You may think about "tricking" the regression with a constant equal to 1.

                  In the example below, you can observe that the margins for all levels are still the same, corroborating the strategy:

                  Code:
                   
                  . webuse lbw
                  (Hosmer & Lemeshow data)
                  
                  . logistic low age lwt i.race smoke ptl ht ui
                  
                  Logistic regression                             Number of obs     =        189
                                                                  LR chi2(8)        =      33.22
                                                                  Prob > chi2       =     0.0001
                  Log likelihood =   -100.724                     Pseudo R2         =     0.1416
                  
                  ------------------------------------------------------------------------------
                           low | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                           age |   .9732636   .0354759    -0.74   0.457     .9061578    1.045339
                           lwt |   .9849634   .0068217    -2.19   0.029     .9716834    .9984249
                               |
                          race |
                        black  |   3.534767   1.860737     2.40   0.016     1.259736    9.918406
                        other  |   2.368079   1.039949     1.96   0.050     1.001356    5.600207
                               |
                         smoke |   2.517698    1.00916     2.30   0.021     1.147676    5.523162
                           ptl |   1.719161   .5952579     1.56   0.118     .8721455    3.388787
                            ht |   6.249602   4.322408     2.65   0.008     1.611152    24.24199
                            ui |     2.1351   .9808153     1.65   0.099     .8677528      5.2534
                         _cons |   1.586014   1.910496     0.38   0.702     .1496092     16.8134
                  ------------------------------------------------------------------------------
                  Note: _cons estimates baseline odds.
                  
                  . margins race
                  
                  Predictive margins                              Number of obs     =        189
                  Model VCE    : OIM
                  
                  Expression   : Pr(low), predict()
                  
                  ------------------------------------------------------------------------------
                               |            Delta-method
                               |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                          race |
                        white  |   .2258418    .041197     5.48   0.000     .1450972    .3065864
                        black  |   .4585359   .0908183     5.05   0.000     .2805353    .6365365
                        other  |   .3769422   .0592032     6.37   0.000     .2609061    .4929783
                  ------------------------------------------------------------------------------
                  
                  . */ not, we may get OR for all levels of race
                  
                  . gen cons1 = 1
                  
                  . logistic low age lwt ibn.race smoke ptl ht ui cons1, nocons
                  note: cons1 omitted because of collinearity
                  
                  Logistic regression                             Number of obs     =        189
                                                                  Wald chi2(9)      =      40.58
                  Log likelihood =   -100.724                     Prob > chi2       =     0.0000
                  
                  ------------------------------------------------------------------------------
                           low | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                           age |   .9732636   .0354759    -0.74   0.457     .9061578    1.045339
                           lwt |   .9849634   .0068217    -2.19   0.029     .9716834    .9984249
                               |
                          race |
                        white  |   1.586014   1.910496     0.38   0.702     .1496092     16.8134
                        black  |   5.606189   7.070615     1.37   0.172     .4732807    66.40743
                        other  |   3.755807   4.149787     1.20   0.231     .4307362    32.74877
                               |
                         smoke |   2.517698    1.00916     2.30   0.021     1.147676    5.523162
                           ptl |   1.719161   .5952579     1.56   0.118     .8721455    3.388787
                            ht |   6.249602   4.322408     2.65   0.008     1.611152    24.24199
                            ui |     2.1351   .9808153     1.65   0.099     .8677528      5.2534
                         cons1 |          1  (omitted)
                  ------------------------------------------------------------------------------
                  
                  . margins race
                  
                  Predictive margins                              Number of obs     =        189
                  Model VCE    : OIM
                  
                  Expression   : Pr(low), predict()
                  
                  ------------------------------------------------------------------------------
                               |            Delta-method
                               |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                          race |
                        white  |   .2258418    .041197     5.48   0.000     .1450972    .3065864
                        black  |   .4585359   .0908183     5.05   0.000     .2805353    .6365365
                        other  |   .3769422   .0592032     6.37   0.000     .2609061    .4929783
                  ------------------------------------------------------------------------------
                  Hopefully that helps
                  Best regards,

                  Marcos

                  Comment

                  Working...
                  X