Announcement

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

  • Multivariate logistic regression with an odd IC

    Hi all,
    I'm running a logistic regression on Stata 14.2 using logistic
    I've run first the univariate analysis and all looked fine but when I tried the multivariate analyses, this is what came back:
    Code:
    Logistic regression                             Number of obs     =         32
                                                    LR chi2(2)        =       7.51
                                                    Prob > chi2       =     0.0234
    Log likelihood =  -17.85913                     Pseudo R2         =     0.1738
    
    --------------------------------------------------------------------------------
    recuperengcreg | Odds Ratio   Std. Err.       z        P>|z|          [95% Conf. Interval]
    ---------------+----------------------------------------------------------------
        WFNSgrupos |  7.05e-07   .0011365    -0.01   0.993            0           .
             VMdic |        8674937    1.40e+10     0.01   0.992            0           .
             _cons |        851450      1.37e+09     0.01   0.993            0           .
    --------------------------------------------------------------------------------
    All variables are dichotomous variables.
    Any idea what is the problem?
    Thanks so much

  • #2
    This is not your first post to this Forum -- you should have read the complete FAQ before posting. In your case #12 might be especially relevant.

    It is better to show us your data before we speculate about sparsely populated cells etc.

    Comment


    • #3
      Sorry about this, I though maybe enough.
      Here comes my data for this variables (I'll also add the univariate analysis for the variables)
      Code:
      input float recuperengcreg byte WFNSgrupos float VMdic
      0 2 1
      . 1 1
      0 2 1
      . 2 1
      . 2 1
      1 2 1
      0 2 1
      0 2 1
      . 1 1
      0 2 1
      . 2 1
      0 2 1
      . 2 1
      0 2 1
      . 2 1
      0 1 1
      0 2 1
      0 2 1
      1 2 1
      . 2 1
      0 2 1
      . 2 1
      0 2 1
      0 1 1
      1 2 1
      . 2 1
      . 2 1
      . 1 0
      . 1 0
      0 1 0
      1 1 0
      . 1 0
      . 1 0
      0 1 0
      1 1 0
      1 1 0
      . 1 0
      . 1 0
      . 1 0
      1 1 0
      1 1 0
      . 1 0
      . 1 0
      . 1 0
      . 1 0
      1 1 0
      0 1 0
      0 1 0
      . 1 0
      1 1 0
      0 1 0
      1 1 0
      1 1 0
      0 1 0
      . 1 0
      1 1 0
      . 1 0
      end
      
       logistic recuperengcreg VMdic
      
      Logistic regression                             Number of obs     =         32
                                                      LR chi2(1)        =       6.62
                                                      Prob > chi2       =     0.0101
      Log likelihood = -18.306253                     Pseudo R2         =     0.1531
      
      --------------------------------------------------------------------------------
      recuperengcreg | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ---------------+----------------------------------------------------------------
               VMdic |   7.222222   5.942108     2.40   0.016     1.439932    36.22428
               _cons |         .6   .3098387    -0.99   0.323     .2180684    1.650858
      --------------------------------------------------------------------------------
      
      . 
      . logistic recuperengcreg WFNSgrupos
      
      Logistic regression                             Number of obs     =         32
                                                      LR chi2(1)        =       3.95
                                                      Prob > chi2       =     0.0468
      Log likelihood = -19.639426                     Pseudo R2         =     0.0914
      
      --------------------------------------------------------------------------------
      recuperengcreg | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ---------------+----------------------------------------------------------------
          WFNSgrupos |   4.583333   3.693047     1.89   0.059     .9447586    22.23525
               _cons |   .1745455   .2008595    -1.52   0.129     .0182971    1.665079
      --------------------------------------------------------------------------------

      Comment


      • #4
        If you look at a twoway table of your variables WFNSgrupo and VMdic using only the valid cases of recuperengcreg you will see an empty cell (and a cell with 100% of the column percentages). Logit models predicting recuperengcreg by VMdic if WFNSgrupo is 2 or predicting recuperengcreg by WFNSgrupo if VMdic is 0 will automatically omit the predictor because of collinearity:
        Code:
        . tab2 VMdic WFNSgrupos if recuperengcreg < ., col chi2
        
        -> tabulation of VMdic by WFNSgrupos if recuperengcreg < .
        
        +-------------------+
        | Key               |
        |-------------------|
        |     frequency     |
        | column percentage |
        +-------------------+
        
                   |      WFNSgrupos
             VMdic |         1          2 |     Total
        -----------+----------------------+----------
                 0 |        16          0 |        16
                   |     88.89       0.00 |     50.00
        -----------+----------------------+----------
                 1 |         2         14 |        16
                   |     11.11     100.00 |     50.00
        -----------+----------------------+----------
             Total |        18         14 |        32
                   |    100.00     100.00 |    100.00
        
                  Pearson chi2(1) =  24.8889   Pr = 0.000
        
        . logit recuperengcreg VMdic if WFNSgrupos == 2
        
        note: VMdic omitted because of collinearity.
        Iteration 0:  Log likelihood = -7.2741177  
        Iteration 1:  Log likelihood = -7.2741177  
        
        Logistic regression                                     Number of obs =     14
                                                                LR chi2(0)    =   0.00
                                                                Prob > chi2   =      .
        Log likelihood = -7.2741177                             Pseudo R2     = 0.0000
        
        --------------------------------------------------------------------------------
        recuperengcreg | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
        ---------------+----------------------------------------------------------------
                 VMdic |          0  (omitted)
                 _cons |  -1.299283   .6513389    -1.99   0.046    -2.575884   -.0226821
        --------------------------------------------------------------------------------
        
        . logit recuperengcreg WFNSgrupos if VMdic == 0
        
        note: WFNSgrupos omitted because of collinearity.
        Iteration 0:  Log likelihood = -10.585012  
        Iteration 1:  Log likelihood = -10.585012  
        
        Logistic regression                                    Number of obs =      16
                                                               LR chi2(0)    =   -0.00
                                                               Prob > chi2   =       .
        Log likelihood = -10.585012                            Pseudo R2     = -0.0000
        
        --------------------------------------------------------------------------------
        recuperengcreg | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
        ---------------+----------------------------------------------------------------
            WFNSgrupos |          0  (omitted)
                 _cons |   .5108256   .5163978     0.99   0.323    -.5012954    1.522947
        --------------------------------------------------------------------------------
        (see also Example 2 under the heading "Model identification" in the Manual [R] for logit). The reason is the empty cell (or the fact that you have not enough data in this situation).

        Comment


        • #5
          Follow-up on #4:

          You also can have a look at "(quasi) complete separation" (e.g. https://stats.oarc.ucla.edu/other/mu...ith-the-issue/) and the PDF-Manual entry to exlogistic.

          Comment


          • #6
            Thanks so much for your answer.
            I'll take a look at all the references you mentioned.

            Comment

            Working...
            X