Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: logistic reg version 8 & 11


From   Ricardo Ovaldia <[email protected]>
To   Statalist <[email protected]>
Subject   st: Re: logistic reg version 8 & 11
Date   Thu, 9 Sep 2010 09:26:03 -0700 (PDT)

Here is an example using the auto data:

. sysuse auto, clear
(1978 Automobile Data)

. version 8

. xi:logistic  foreign i.rep78
i.rep78           _Irep78_1-5         (naturally coded; _Irep78_1 omitted)

note: _Irep78_2 != 0 predicts failure perfectly
      _Irep78_2 dropped and 8 obs not used


Logistic regression                               Number of obs   =         61
                                                  LR chi2(3)      =      23.66
                                                  Prob > chi2     =     0.0000
Log likelihood = -27.444671                       Pseudo R2       =     0.3012

------------------------------------------------------------------------------
     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   _Irep78_3 |   1.03e+07          .        .       .            .           .
   _Irep78_4 |   9.24e+07   7.12e+07    23.83   0.000     2.04e+07    4.18e+08
   _Irep78_5 |   4.16e+08   4.12e+08    20.03   0.000     5.97e+07    2.90e+09
------------------------------------------------------------------------------
Note: 2 failures and 0 successes completely determined.

. version 11

. xi:logistic  foreign i.rep78
i.rep78           _Irep78_1-5         (naturally coded; _Irep78_1 omitted)
note: _Irep78_2 != 0 predicts failure perfectly
      _Irep78_2 dropped and 8 obs not used


Logistic regression                               Number of obs   =         61
                                                  LR chi2(3)      =      23.66
                                                  Prob > chi2     =     0.0000
Log likelihood = -27.444671                       Pseudo R2       =     0.3012

------------------------------------------------------------------------------
     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   _Irep78_2 |  (omitted)
   _Irep78_3 |   788893.3   1.49e+09     0.01   0.994            0           .
   _Irep78_4 |    7101032   1.34e+10     0.01   0.993            0           .
   _Irep78_5 |   3.20e+07   6.02e+10     0.01   0.993            0           .
------------------------------------------------------------------------------


Ricardo Ovaldia, MS
Statistician 
Oklahoma City, OK


Ricardo Ovaldia, MS
Statistician 
Oklahoma City, OK


--- On Thu, 9/9/10, Ricardo Ovaldia <[email protected]> wrote:

> From: Ricardo Ovaldia <[email protected]>
> Subject: logistic reg version 8 & 11
> To: "Statalist" <[email protected]>
> Date: Thursday, September 9, 2010, 11:19 AM
> 
> I wrote a program a while back using version 8 and I notce
> the -logistic- gives different results. The results under
> version 8 differ from those under version 11. Why is this?
> Which is correct?
> 
> . version 8
> 
> . xi: logistic  case i.x
> i.x           
>    _Ix_1-3         
>    (_Ix_1 for x==A_A omitted)
> 
> Logistic regression         
>                
>      Number of
> obs   =       1195
>                
>                
>                
>   LR chi2(2)      =   
>    5.04
>                
>                
>                
>   Prob > chi2     = 
>    0.0806
> Log likelihood = -665.32155       
>            
>    Pseudo R2   
>    =     0.0038
> 
> ------------------------------------------------------------------------------
>         case | Odds
> Ratio   Std. Err.      z 
>   P>|z|     [95% Conf.
> Interval]
> -------------+----------------------------------------------------------------
>        _Ix_2
> |   2.14e-09       
>   .        .   
>    .           
> .           .
>        _Ix_3
> |   4.95e-09   3.08e-09   -30.80   0.000 
>    1.47e-09    1.67e-08
> ------------------------------------------------------------------------------
> Note: 0 failures and 1 success completely determined.
> 
> . version 11
> 
> . xi: logistic  case i.x
> i.x           
>    _Ix_1-3         
>    (_Ix_1 for x==A_A omitted)
> 
> Logistic regression         
>                
>      Number of
> obs   =       1195
>                
>                
>                
>   LR chi2(2)      =   
>    5.04
>                
>                
>                
>   Prob > chi2     = 
>    0.0806
> Log likelihood = -665.32156       
>            
>    Pseudo R2   
>    =     0.0038
> 
> ------------------------------------------------------------------------------
>         case | Odds
> Ratio   Std. Err.      z 
>   P>|z|     [95% Conf.
> Interval]
> -------------+----------------------------------------------------------------
>        _Ix_2
> |   1.02e-06   .0003817 
>   -0.04   0.971     
>       0       
>    .
>        _Ix_3
> |   2.36e-06   .0008842 
>   -0.03   0.972     
>       0       
>    .
> ------------------------------------------------------------------------------
> 
> 
> 
> 
> Ricardo Ovaldia, MS
> Statistician 
> Oklahoma City, OK
> 
> 
>       
> 


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index