Announcement

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

  • Logistic regression shows odds ratio, then what margins show? the risk? See

    After logistic regression, odds ratio were reported. I used the syntax of 'margins' to get other result. It seems that these results from margins were risk rather than odds. If margins resulted in risk rates, how to change the output of logistic regression from odds ratio (by default it's odds ratio) to risk ratio? Much appreciated!

    Tom

    Code:
    . logistic firsttherapeuticinrreached i.nonaaornonanona i.ageforttest i.af i.ttesttargetinr
    
    Logistic regression                             Number of obs     =        187
                                                    LR chi2(4)        =      25.32
                                                    Prob > chi2       =     0.0000
    Log likelihood = -84.409294                     Pseudo R2         =     0.1304
    
    --------------------------------------------------------------------------------------------
    firsttherapeuticinrreached | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ---------------------------+----------------------------------------------------------------
             1.nonaaornonanona |   .1526829    .073589    -3.90   0.000     .0593656    .3926867
                 1.ageforttest |   2.916752   1.356175     2.30   0.021     1.172531    7.255625
                          1.af |   .3494673    .161598    -2.27   0.023     .1411888    .8649931
              1.ttesttargetinr |   2.409212    1.35103     1.57   0.117     .8026778    7.231175
                         _cons |   4.008227   1.200546     4.64   0.000     2.228436    7.209492
    --------------------------------------------------------------------------------------------
    
    . margins i.nonaaornonanona
    
    Predictive margins                              Number of obs     =        187
    Model VCE    : OIM
    
    Expression   : Pr(firsttherapeuticinrreached), predict()
    
    ---------------------------------------------------------------------------------
                    |            Delta-method
                    |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ----------------+----------------------------------------------------------------
    nonaaornonanona |
                 0  |   .8367911   .0286637    29.19   0.000     .7806114    .8929709
                 1  |   .4675317   .0984477     4.75   0.000     .2745778    .6604856
    ---------------------------------------------------------------------------------
    
    . margins r.nonaaornonanona
    
    Contrasts of predictive margins
    Model VCE    : OIM
    
    Expression   : Pr(firsttherapeuticinrreached), predict()
    
    ---------------------------------------------------
                    |         df        chi2     P>chi2
    ----------------+----------------------------------
    nonaaornonanona |          1       12.88     0.0003
    ---------------------------------------------------
    
    -----------------------------------------------------------------
                    |            Delta-method
                    |   Contrast   Std. Err.     [95% Conf. Interval]
    ----------------+------------------------------------------------
    nonaaornonanona |
          (1 vs 0)  |  -.3692594   .1028906     -.5709214   -.1675975
    -----------------------------------------------------------------

  • #2
    Tom:
    the reported metric is the predicted probability of a positive outcome (see -help margins-; -help logistic postestimation-).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Tom:
      the reported metric is the predicted probability of a positive outcome (see -help margins-; -help logistic postestimation-).
      So the reported metric of margins is the risk rates of two groups by i.variable, and the output of margins r.variable is the absolute risk difference between two groups. However, I want the output of -logistic indep dep1, dep2, ... depk- to show the risk ratio rather than odds ratio. Possible?

      Tom

      Comment


      • #4
        This issue was already approached here.
        Best regards,

        Marcos

        Comment


        • #5
          Originally posted by Marcos Almeida View Post
          This issue was already approached here.
          Thanks for your explanation. I use 'logit' (logistic would output odds ratio instead of coef.) and it results in a same result, with the exception that coef. were reported. Just don't know how to output risk ratio.

          Comment

          Working...
          X