Announcement

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

  • Converting logit regression coefficients

    Hi all,

    I am wondering if there is a way to convert logit regression coefficients into percentages. Can you help? Thanks!

  • #2
    Percent of what? Could perhaps post an example output and provide an example for conversion?

    Comment


    • #3
      So, for instance, let's say I do this:

      logit yvar xvar othervars

      Is there a way that I can get the coefficient off of the xvar to show me that if I increase the xvar by 1 unit, how much does the Y var increase or decrease in a percent?

      Comment


      • #4
        As phrased, the answer to your question is no. The percentage point change in Y associated with a unit increase in xvar will depend on the starting value of xvar, and also on the values of othervars. Your question has infinitely many answers, so, in effect, it has no answer.

        That said, if you specify the starting values of xvar and othervars, then you can get the percentage point increase in Y associated with a unit increase in xvar from that starting configuration by using the -margins- command:
        Code:
        margins, dydx(xvar) at(........)
        where you replace ....... by an appropriate specification of the values of all variables. See -help margins- for details of the syntax for this.

        People are sometimes interested in the average percentage point change in Y with a unit change in xvar, the average being taken over all combinations of xvar and othervars in the estimation sample. That can be done as:

        Code:
        margins, dydx(xvar)
        And people are sometimes interested in the percentage point change in Y with a unit change in xvar with all variables set at their mean values (note that this is very different from the preceding):

        Code:
        margins, dydx(xvar) atmeans

        Comment


        • #5
          If, instead, you are interested to translate the odds ratios in risk ratios (relative risks) per unit change of the independent variables, you can use -binreg ..., rr-. However, this does not always converge. Alternatively you can use -poisson ..., vce(robust) irr-. For more information and alternative methods see: Cummings, P. (2009). Methods for estimating adjusted risk ratios. The Stata Journal, 9(2), 175-196.

          Example:
          Code:
          . sysuse auto
          (1978 Automobile Data)
          
          . binreg foreign mpg headroom, rr
          
          Iteration 1:   deviance =  271.0127
          Iteration 2:   deviance =  81.67472
          Iteration 3:   deviance =  78.09047
          Iteration 4:   deviance =  77.74763
          Iteration 5:   deviance =  77.74443
          Iteration 6:   deviance =  77.74442
          Iteration 7:   deviance =  77.74442
          
          Generalized linear models                         Number of obs   =         74
          Optimization     : MQL Fisher scoring             Residual df     =         71
                             (IRLS EIM)                     Scale parameter =          1
          Deviance         =   77.7444237                   (1/df) Deviance =   1.094992
          Pearson          =  68.79482381                   (1/df) Pearson  =   .9689412
          
          Variance function: V(u) = u*(1-u)                 [Bernoulli]
          Link function    : g(u) = ln(u)                   [Log]
          
                                                            BIC             =  -227.8442
          
          ------------------------------------------------------------------------------
                       |                 EIM
               foreign | Risk Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                   mpg |   1.078314   .0117803     6.90   0.000     1.055471    1.101652
              headroom |    .793299   .1541072    -1.19   0.233     .5421025    1.160893
                 _cons |   .1005949   .0583758    -3.96   0.000     .0322566    .3137133
          ------------------------------------------------------------------------------
          Note: _cons estimates baseline risk.
          
          . poisson foreign mpg headroom, vce(robust) irr
          
          Iteration 0:   log pseudolikelihood =  -44.35289  
          Iteration 1:   log pseudolikelihood = -44.352045  
          Iteration 2:   log pseudolikelihood = -44.352045  
          
          Poisson regression                              Number of obs     =         74
                                                          Wald chi2(2)      =      21.54
                                                          Prob > chi2       =     0.0000
          Log pseudolikelihood = -44.352045               Pseudo R2         =     0.0890
          
          ------------------------------------------------------------------------------
                       |               Robust
               foreign |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                   mpg |   1.073029   .0230139     3.29   0.001     1.028858    1.119097
              headroom |   .6735429   .1282538    -2.08   0.038     .4637482    .9782464
                 _cons |   .1774262   .1608975    -1.91   0.057     .0299994    1.049356
          ------------------------------------------------------------------------------
          Note: _cons estimates baseline incidence rate.
          Last edited by Dirk Enzmann; 19 May 2021, 12:30.

          Comment


          • #6
            Thank you so much!!!!!!!!!!!!!

            Comment

            Working...
            X