Announcement

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

  • large

    Hi everyone,
    I am using a dtaset of 6000 individuals with 2000 cases (categorized 1) and 4000 control (categorized 0). when i run univariate logistic regression with one of the IV i get a very large OR, e.g 130311 wiht P>|z| 0.000. i don't have any outliers and my variavbes are normally distributed. if i use other variables the ORs are normal. Any help where to look is welcome.
    stat 15.1 on mac

    regards

  • #2
    Abdelilah:
    as this is not your first post, you should be familiar with the FAQ that recommend to share what you typed and what Stata gave you back. Thanks.
    Set aside any opinion about the reliability and the usefulness of a set of univariate logistic regressions (reported in many technical journals, though), your "weird" result might be due to the way regressand and predictor are scaled.
    I 'm also unclear with your definition of normality concernng the results of the other univariate logistic regressions that you ran: do you mean that their ORs are in line with your expectations/previous researches on the very same topic preformed in your research field/a mix of the previous assumptions/else?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3

      Very sorry Carlo. Please see below examples of normal and abnormal OR
      Attached Files
      Last edited by abdelilah arredouani; 06 Feb 2022, 07:36.

      Comment


      • #4
        The displayed coefficient depends on the units of the variable. You can always rescale the variable without affecting the inferences that you draw. For example:

        Code:
        sysuse auto
        logit foreign gear, or nolog
        
        *INSTEAD OF GEAR RATIO, USE (GEAR RATIO* 100)
        gen gear100 = gear*100
        logit foreign gear100, or nolog
        Res.:

        Code:
        . logit foreign gear, or nolog
        
        Logistic regression                             Number of obs     =         74
                                                        LR chi2(1)        =      45.96
                                                        Prob > chi2       =     0.0000
        Log likelihood = -22.054175                     Pseudo R2         =     0.5103
        
        ------------------------------------------------------------------------------
             foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
          gear_ratio |    342.704   447.5543     4.47   0.000     26.50286    4431.448
               _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
        ------------------------------------------------------------------------------
        Note: _cons estimates baseline odds.
        
        . 
        . *INSTEAD OF GEAR RATIO, USE (GEAR RATIO* 100)
        
        . gen gear100 = gear*100
        
        . logit foreign gear100, or nolog
        
        Logistic regression                             Number of obs     =         74
                                                        LR chi2(1)        =      45.96
                                                        Prob > chi2       =     0.0000
        Log likelihood = -22.054175                     Pseudo R2         =     0.5103
        
        ------------------------------------------------------------------------------
             foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
             gear100 |   1.060106   .0138444     4.47   0.000     1.033315    1.087591
               _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
        ------------------------------------------------------------------------------
        Note: _cons estimates baseline odds.

        Comment


        • #5
          Thanks Andrew. I tried by multiplying my IV by 100 as you did, and I got a reasonable OR (1.21). But if multiplied by 10 I get different OR (3.4). What does that mean?. The unit of my variable is cm
          Last edited by abdelilah arredouani; 06 Feb 2022, 10:29.

          Comment


          • #6
            Abdelilah:
            ...but, shamelessly elaborating on Andrew's helpful example, LR chi2, Pseudo R2, z and p-value do not change:
            Code:
            . sysuse auto
            (1978 automobile data)
            
            . logit foreign gear, or nolog
            
            Logistic regression                                     Number of obs =     74
                                                                    LR chi2(1)    =  45.96
                                                                    Prob > chi2   = 0.0000
            Log likelihood = -22.054175                             Pseudo R2     = 0.5103
            
            ------------------------------------------------------------------------------
                 foreign | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
            -------------+----------------------------------------------------------------
              gear_ratio |    342.704   447.5543     4.47   0.000     26.50286    4431.448
                   _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
            ------------------------------------------------------------------------------
            Note: _cons estimates baseline odds.
            
            . g gear10=gear*10
            
            . logit foreign gear10, or nolog
            
            Logistic regression                                     Number of obs =     74
                                                                    LR chi2(1)    =  45.96
                                                                    Prob > chi2   = 0.0000
            Log likelihood = -22.054177                             Pseudo R2     = 0.5103
            
            ------------------------------------------------------------------------------
                 foreign | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                  gear10 |   1.792635   .2341091     4.47   0.000     1.387808    2.315552
                   _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
            ------------------------------------------------------------------------------
            Note: _cons estimates baseline odds.
            
            
            . g gear100=gear10 *10
            
            . logit foreign gear100, or nolog
            
            Logistic regression                                     Number of obs =     74
                                                                    LR chi2(1)    =  45.96
                                                                    Prob > chi2   = 0.0000
            Log likelihood = -22.054175                             Pseudo R2     = 0.5103
            
            ------------------------------------------------------------------------------
                 foreign | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                 gear100 |   1.060106   .0138444     4.47   0.000     1.033315    1.087591
                   _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
            ------------------------------------------------------------------------------
            Note: _cons estimates baseline odds.
            
            .
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              It's easier to interpret the average partial effect which will reflect the probability change in the outcome for a unit change in the independent variable.

              Code:
              logit y x1...xn
              margins, dydx(*)

              Otherwise, see https://stats.oarc.ucla.edu/other/mu...ic-regression/ if you want to interpret the odds ratios.
              Last edited by Andrew Musau; 06 Feb 2022, 10:36.

              Comment


              • #8
                I appreciate you help guys. I still need your help to understand. my IV is a ratio (range 0.34-0.84). if i run the LR I get OR=256029.8. If I multiply IV by 100, as suggested by Andrew, I get OR 1.13. If I myltiply by 10 i get OR 3.47. LR chi2, Pseudo R2, z and p-value do not change.
                How do i justify using *100 for example, and then interpret accordingly.


                Best

                Comment


                • #9
                  As I said, the units of the variable do not matter. 100 cm is 1 meter and 0.01cm is 0.1 millimeters. But the logit transformation is a nonlinear one, so I will repeat the advice in #7 to look into APEs if you want a straightforward APE interpretation or the link if you go the odds ratios route. If you do this, you will see that the transformations only change the units of the APEs as well.

                  Comment


                  • #10
                    Abdelilah:
                    exploting Andrew's winning assist once more, you can see that is a matter of scale:
                    Code:
                    . logit foreign gear10, or nolog
                    
                    Logistic regression                                     Number of obs =     74
                                                                            LR chi2(1)    =  45.96
                                                                            Prob > chi2   = 0.0000
                    Log likelihood = -22.054177                             Pseudo R2     = 0.5103
                    
                    ------------------------------------------------------------------------------
                         foreign | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                          gear10 |   1.792635   .2341091     4.47   0.000     1.387808    2.315552
                           _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
                    ------------------------------------------------------------------------------
                    Note: _cons estimates baseline odds.
                    
                    . margins, dydx( gear10 )
                    
                    Average marginal effects                                    Number of obs = 74
                    Model VCE: OIM
                    
                    Expression: Pr(foreign), predict()
                    dy/dx wrt:  gear10
                    
                    ------------------------------------------------------------------------------
                                 |            Delta-method
                                 |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                          gear10 |   .0522162   .0041772    12.50   0.000      .044029    .0604033
                    ------------------------------------------------------------------------------
                    
                    . logit foreign gear100, or nolog
                    
                    Logistic regression                                     Number of obs =     74
                                                                            LR chi2(1)    =  45.96
                                                                            Prob > chi2   = 0.0000
                    Log likelihood = -22.054175                             Pseudo R2     = 0.5103
                    
                    ------------------------------------------------------------------------------
                         foreign | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                         gear100 |   1.060106   .0138444     4.47   0.000     1.033315    1.087591
                           _cons |   4.13e-09   1.74e-08    -4.58   0.000     1.07e-12    .0000158
                    ------------------------------------------------------------------------------
                    Note: _cons estimates baseline odds.
                    
                    . margins, dydx( gear100 )
                    
                    Average marginal effects                                    Number of obs = 74
                    Model VCE: OIM
                    
                    Expression: Pr(foreign), predict()
                    dy/dx wrt:  gear100
                    
                    ------------------------------------------------------------------------------
                                 |            Delta-method
                                 |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                         gear100 |   .0052216   .0004177    12.50   0.000     .0044029    .0060403
                    ------------------------------------------------------------------------------
                    
                    .
                    Kind regards,
                    Carlo
                    (StataNow 18.5)

                    Comment

                    Working...
                    X