- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear SAS users,
Fisher's Exact test is the appropriate test for me to use to identify whether there is a relationship between two variables: 1) time period (1,2, or 3) and 2)number of visits (0,1,2,3 or 4), I have 523 observations.
When I do a proc freq some cells have less than 5 observations, hence the fisher's exact.
This is the code that I used:
proc freq data=dataset;
tables variable3 timeperiod*numbvisits/fisher;
where variable3 in (1);
run;
Now, when I ran this over the weekend, I had to terminate it on Monday because it still had not computed it:
NOTE: There were 523 observations read from the data set
dataset
WHERE variable=1;
NOTE: PROCEDURE FREQ used (Total process time):
real time 95:51:11.37
cpu time 10:41:30.97
The only other comment in the log was that computing would take a lot of time and memory.
Therefore, I am asking if there is an alternative to Fisher's exact that I can use that would be equally as meaningful? and how I would go about accomplishing it?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You should post the exact code you attempted as it is hard to provide any specifics without knowing what was attempted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, I will
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
does the code make sense? its pretty simple, do you have any other suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
With 3 *5 =15 cells and 523 obs I would think that Fisher would be okay to calculate.
1. Post code used and log.
2. If allowed post the crosstab table/result (without fisher).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
can't really post the table, but its a basic 3*5 table with 508 obs. with 15 missing and 4 cells with <5 obs
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
One thing that you could do is to run it without the Fisher option. If the Pearson's Chi-Square is not significant, then the Fisher won't be either.
Also, consider Monte Carlo simulation of exact p-values:
"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."
Doc Muhlbaier
Duke