May 27, 2021 SAS
Fisher Precision Test is a statistical test used to determine whether there is a non-random association between two classification variables. I n SAS, this is performed using PROC FREQ. W e use the Tables option to use two variables that have been tested by Exact Fisher.
The basic syntax for applying Fisher Exact testing in SAS is:
PROC FREQ DATA = dataset ; TABLES Variable_1*Variable_2 / fisher;
Here is a description of the parameters used:
To apply Fisher's precise test, we selected two classification variables called Test1 and Test2 and their results. W e use PROC FREQ to apply the test shown below.
data temp; input Test1 Test2 Result @@; datalines; 1 1 3 1 2 1 2 1 1 2 2 3 ; proc freq; tables Test1*Test2 / fisher; run;
When we execute the code above, we get the following results: