BookmarkSubscribeRSS Feed
varatt90
Obsidian | Level 7

Hi, 

 

I tried to run a fisher's test, as I have some cells with less than 5 counts, but my sample size is 6,000. As a result, the time to run the code is taking long. 

 

Is there another test I could use or should I just wait it out?

 

Thank you

4 REPLIES 4
ballardw
Super User

How long is "long"?

Can you share the code that you are currently running? There are multiple procedures that use Fisher's test so we really need to know which one you are using.

varatt90
Obsidian | Level 7

Thank you for your response.

 

The code has been running for 45 min now. 

My code is: 

 

 

PROC FREQ DATA = Dataset;
TABLES Variable1*variable2/ FISHER;
RUN; 

 

PaigeMiller
Diamond | Level 26

It's always a good idea, highly recommended, to read the documentation which says:

 

Note: PROC FREQ computes exact tests by using fast and efficient algorithms that are superior to direct enumeration. Exact tests are appropriate when a data set is small, sparse, skewed, or heavily tied. For some large problems, computation of exact tests might require a substantial amount of time and memory. Consider using asymptotic tests for such problems. Alternatively, when asymptotic methods might not be sufficient for such large problems, consider using Monte Carlo estimation of exact p-values. You can request Monte Carlo estimation by specifying the MC computation-option in the EXACT statement. See the section Computational Resources for more information.

--
Paige Miller
varatt90
Obsidian | Level 7

Thank you, that worked! If anyone else is wondering, I was able to produce the F-test using the code:

 

PROC FREQ DATA = dataset;
TABLES variable1*variable2;
EXACT FISHER/ MC;
RUN;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1260 views
  • 6 likes
  • 3 in conversation