Statalist


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

st: AW: Bug in logit?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Bug in logit?
Date   Mon, 21 Sep 2009 13:40:33 +0200

<> 

BTW, a bug in a popular command such as -logistic- is highly unlikely.
Still, I do notice that the commands 


*************
sysuse auto, clear
logistic for we we le he
*************

typed in Stata 10.1 lead to the ouput 

. logistic for we we le he

note: weight dropped because of collinearity

Logistic regression                               Number of obs   =
74
                                                  LR chi2(3)      =
31.99
                                                  Prob > chi2     =
0.0000
Log likelihood = -29.039496                       Pseudo R2       =
0.3552

----------------------------------------------------------------------------
--
     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
      weight |   .9971695   .0016798    -1.68   0.092     .9938826
1.000467
      length |   1.009006   .0547413     0.17   0.869     .9072225
1.122209
    headroom |   .9818066   .4577531    -0.04   0.969     .3937001
2.448422
----------------------------------------------------------------------------
--


while the same command issued in Stata 11 leads to

. logistic for we we le he
note: weight omitted because of collinearity

Logistic regression                               Number of obs   =
74
                                                  LR chi2(3)      =
31.99
                                                  Prob > chi2     =
0.0000
Log likelihood = -29.039496                       Pseudo R2       =
0.3552

----------------------------------------------------------------------------
--
     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
      weight |   .9971695   .0016798    -1.68   0.092     .9938826
1.000467
      weight |  (omitted)
      length |   1.009006   .0547413     0.17   0.869     .9072225
1.122209
    headroom |   .9818066   .4577532    -0.04   0.969     .3937001
2.448423
----------------------------------------------------------------------------
--


where the information returned by the latter output is much clearer. Also
note the difference btw "dropped" and "omitted" in the -note- at the top of
the output...



The idea that you got confused somewhere in those 120 covariates and issued
one of them twice is not far fetched, though, is it?



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Stephan
Rudolfer
Gesendet: Montag, 21. September 2009 12:52
An: [email protected]
Betreff: st: Bug in logit?

I am fitting 120 variables to a binary outcome using logit.  Inevitably,
some of the covariates are collinear.  So, logit drops some of them.
However, one of the dropped variables nevertheless appears in the model with
a non-zero coefficient.  This is surely a bug?

Comments would be appreciated. I can send the stata output if required.


*
*   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/


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index