Programming the statistical procedures from SAS

Hi

Reply
New Contributor
Posts: 2

Hi

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?

New Contributor
Posts: 2

Re: Hi

Hi any one please can reply above question

Super User
Posts: 9,766

Re: Hi

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

SAS Employee
Posts: 122

Re: Hi

Hi,

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

Jason Xin

Trusted Advisor
Posts: 1,219

Re: Hi

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

Super User
Posts: 18,526

Re: Hi

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

Respected Advisor
Posts: 2,655

Re: Hi

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

Trusted Advisor
Posts: 1,219

Re: Hi

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

Respected Advisor
Posts: 2,655

Re: Hi

 

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

Trusted Advisor
Posts: 1,219

Re: Hi

Thanks Steve - This is interesting to know.

Naeem

Ask a Question
Discussion stats
  • 9 replies
  • 403 views
  • 1 like
  • 6 in conversation