0
votes

how to calculate P-value by using proc freq ( by fisher exact method) in SAS, as i am getting a warning note while using chisq method in proc freq. WARNING: 25% of the cells have expected counts less than 5. Chi-Square may not be a valid test please provide me syntax and explanation why i am geting this warning? thanks

Current Code:

ods OUTPUT Freq.Table1.ChiSq=P1_&TR1&V1(WHERE=(Statistic="Chi-Square") RENAME=(Prob=COL&TR1)); 
PROC FREQ DATA=P&V1;
    TABLE TREATMENT*SSA/CHISQ ;
    WHERE TREATMENT IN (1 &TR1);
RUN; 
QUIT;
1
Please provide the code you are currently using and what you have tried so far.Michael Richardson
@probackpacker : here is code: ods OUTPUT Freq.Table1.ChiSq=P1_&TR1&V1(WHERE=(Statistic="Chi-Square") RENAME=(Prob=COL&TR1)); PROC FREQ DATA=P&V1; TABLE TREATMENT*SSA/CHISQ ; WHERE TREATMENT IN (1 &TR1); RUN; QUIT; i have 7 treatment groups(&tr1 to 7) and one vehicle pooled, so i am comparing each group with pooled group , so there are macros in the code. i need fisher p-value to be outputedved_null_

1 Answers

1
votes

All you need to do is put / FISHER instead of / CHISQ in your TABLES statement. You'll need to change the ODS statement as well, the table name is 'FishersExact'