BookmarkSubscribeRSS Feed
Stat_vijay
Calcite | Level 5

For data has 2 treatment and 3 category.

trt1 : 1    0    0
trt2 : 0   0    0

is it possible for do fisher exact test in proc freq?

9 REPLIES 9
Stat_vijay
Calcite | Level 5

Hi any one please can reply above question

Ksharp
Super User

Yeah. I think so.  and change your data structure firstly. But your cell freq better all have value . what is your whole sample data.

proc freq;

table treatment*category /fisher;

weight wth;

run;

Xia Keshan

JasonXin
SAS Employee

Hi,

You can look into proc transpose to change the structure to fit the FREQ procedure input requirement.

Jason Xin

stat_sas
Ammonite | Level 13

There is no problem in performing fisher's exact test using proc freq but your data does not meet the requirement for the test.

Reeza
Super User

Your sample size is too small to draw any statistically significant conclusion. Performing a test would be misleading.

SteveDenham
Jade | Level 19

Listen to .  Note that for 2x2 tables, Fisher's Exact Test will require at least 5 observations per row (and complete separation) to get a significant result.  If you do not have that, you may well be wasting your time trying to get a p value.

Steve Denham

stat_sas
Ammonite | Level 13

Hi Steve,

I think Fisher's Exact test does not depend on large-sample distribution assumptions, and appropriate even for small sample sizes as well. Please correct me if I am wrong, is it expected cell frequency or obervations per row that should be at least 5?

Regards,

Naeem

SteveDenham
Jade | Level 19

 

Sorry, what I wrote was easily misinterpretable, and wrong in the details anyway.  For a balanced design, you need at least three observations per row, completely separated by columns to obtain significance using Fisher's Exact Test  Nothing to do with asymptotic assumptions or expected cell frequencies.

data one;

input a b wt;

cards;

0 0 0

0 1 3

1 0 3

1 1 0

;

proc freq data=one;

tables a*b/exact;

weight wt;

run;

Note that if you redistribute the 6 obs or have fewer total observations, no significance can be found.

Steve Denham

stat_sas
Ammonite | Level 13

Thanks Steve - This is interesting to know.

Naeem

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 9 replies
  • 1820 views
  • 1 like
  • 6 in conversation