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

Re: st: Slow STATA


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: Slow STATA
Date   Mon, 11 Oct 2004 21:37:01 -0500

At 04:26 PM 10/11/2004 -0400, Wagner, Joseph wrote:
I have had trouble running a series of simple exact tests.  Whenever my
tables go beyond 2x2 to tables such as the example below, STATA grinds to a
virtual halt.  I waited a half hour before pressing the "break" button.
Well, I got it to run in a mere 2 hours 40 minutes on my 1.7 Mhz machine with WinXP -- and as you can see, the wait really wasn't worth it!

. tab score arm, chi2 lrchi2 exact

| Intervention
score | Lifestyle Education | Total
-----------+----------------------+----------
0 | 38 54 | 92
1 | 73 73 | 146
2 | 56 58 | 114
3 | 29 37 | 66
4 | 21 20 | 41
5 | 6 3 | 9
6 | 3 3 | 6
-----------+----------------------+----------
Total | 226 248 | 474

Pearson chi2(6) = 3.7989 Pr = 0.704
likelihood-ratio chi2(6) = 3.8263 Pr = 0.700
Fisher's exact = 0.707

Skimming through the Statalist archives, it looks like if you really really really need Fisher's Exact Test for tables like this, then set your computer running and check back every few hours\days\weeks to see if it has finished yet. Or, use software that has a faster algorithm -- in a message 2 years ago Richard Goldstein suggested StatXact. SPSS has an exact tests module but I've never used it.

But, do you really need this? Joseph Coveney has suggested one alternative that may be more appropriate anyway. Sometimes, too, people just combine sparse categories and use a chi-square test. My guess (possibly wrong) is that you won't see Fisher's Exact test reported very often for tables like this - 5 or 10 years ago people probably didn't have the hardware to run it even if they wanted to.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

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