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;
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'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.