Hi everyone,
I have 2 categorical variables: Var1 - 3 levels, Var2- 5 levels (i.e., table is bigger than 2x2). Since I have multiple cells <5, I have run a Fisher's exact test with Monte Carlo estimation for the p value (code and output is below). I understand that if I want to determine which specific cells are not associated, I need to perform a post hoc test, but I'm not sure which test to perform, or how to do this in SAS? From doing some research online, it seems like a Bonferroni correction might be a suitable choice? Any help would be very much appreciated.
CODE:
proc freq data=winter_t1;
title "Fisher's exact with exact option";
tables var1*var2;
exact fisher/mc;
run;
OUTPUT:
Statistics for Table of Var1 by Var2 |
Statistic | DF | Value | Prob |
Chi-Square | 8 | 434.4255 | <.0001 |
Likelihood Ratio Chi-Square | 8 | 186.6401 | <.0001 |
Mantel-Haenszel Chi-Square | 1 | 92.1028 | <.0001 |
Phi Coefficient |
| 0.7704 |
|
Contingency Coefficient |
| 0.6103 |
|
Cramer's V |
| 0.5447 |
|
WARNING: 27% of the cells have expected counts less |
Fisher's Exact Test | |
Table Probability (P) | <.0001 |
Monte Carlo Estimate for the Exact Test | |
Pr <= P | <.0001 |
99% Lower Conf Limit | <.0001 |
99% Upper Conf Limit | 0.0005 |
|
|
Number of Samples | 10000 |
Initial Seed | 814770001 |
Sample Size = 732 |
You might try one of the suggested approaches in the usage note linked below.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.