Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: likelihood ratio test error message


From   Richard Williams <[email protected]>
To   [email protected]
Subject   RE: st: likelihood ratio test error message
Date   Fri, 05 Mar 2004 23:52:22 -0500

At 09:28 PM 3/5/2004 -0600, Rivera, Semilla  M. wrote:
Thanks so much, Richard.  I will try this.  :)
Another approach (there are many) is to use commands like

. gen touse = !missing(y, x1, x2, x3, x4)
. logit y x1 x2 if touse

That is, you create a variable, e.g. touse, which is coded 1 for the cases you want to analyze and 0 otherwise. In this case, you are restricting your analysis to cases with complete data on y, x1, x2, x3 and x4. You can also make the selection more complicated if you need to, e.g. limit it to females with nonmissing data.

The above approach, of course, assumes that you want to do listwise deletion of missing data. That is probably the most common strategy, but there are others, e.g. impute values for the missing data.

Finally, there is a -force- option on the -lrtest- command that might make your original error go away, but you probably don't want to use it, i.e. it probably won't give you the right results.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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