Statalist


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

st: AW: Bug in logit?


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Bug in logit?
Date   Mon, 21 Sep 2009 13:12:58 +0200

<> 

Have you made sure there are no repetitions in the -varlist- for -logistic-?
Note that in the example below, "x1" does exhibit the behavior you
complained about:


*************
vers 10.1

clear*
set obs 10000

gen x1=26+int(27*runiform())
gen x2=runiform()<.48

gen byte draw = /* 
 */ runiform() < /* 
 */ invlogit(1+.02*x1+.3*x2)

xi: logistic draw x1 i.x2 x1, nolog
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Stephan
Rudolfer
Gesendet: Montag, 21. September 2009 12:52
An: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index