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

Re: st: Slow STATA


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Slow STATA
Date   Tue, 12 Oct 2004 01:13:56 +0100 (BST)

Richard Williams replied:

> Yes, but you are using a dinky little 2 X 2 table whereas Joseph's table
> is
> 7 X 2.  There is a reason that even when you specify -all- as an option on
> -tabulate- you still have to specify -exact- separately -- the Fisher
> Exact
> Test can take a long time even for a computer.  I'll try Joseph's problem
> out on my machine and see if I fair any better.

Fair enough, but running a larger table on the -union- data still poses no
problem on my machine (save the (minor?) error registered at the end):

. webuse union

. tab year union, exact all

 interview |      1 if union
      year |         0          1 |     Total
-----------+----------------------+----------
        70 |     1,310        348 |     1,658
        71 |     1,412        381 |     1,793
        72 |     1,576        382 |     1,958
        73 |     1,633        424 |     2,057
        77 |     2,180        490 |     2,670
        78 |     1,530        463 |     1,993
        80 |     1,432        596 |     2,028
        82 |     1,846        562 |     2,408
        83 |     1,733        461 |     2,194
        85 |     1,888        600 |     2,488
        87 |     1,981        555 |     2,536
        88 |     1,868        549 |     2,417
-----------+----------------------+----------
     Total |    20,389      5,811 |    26,200

         Pearson chi2(11) = 107.8144   Pr = 0.000
likelihood-ratio chi2(11) = 105.0420   Pr = 0.000
               Cram�r's V =   0.0641
                    gamma =   0.0342  ASE = 0.009
          Kendall's tau-b =   0.0192  ASE = 0.005
integer overflow due to large row margin frequencies
r(1401);

Using Dan Blanchette's -etime- from SSC, I approximately timed the command
to take no more than 2 seconds: and my machine is considerably slower than
Joseph's.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps
*
*   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