Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

SAS Fisher precision testing


May 27, 2021 SAS


Table of contents


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.

Syntactic

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:

  • dataset is the name of the dataset.
  • Variable_1 the variable_2 is a variable from the dataset.

Apply Fisher precision testing

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.

Cases

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:

SAS Fisher precision testing