2 min read

Confidence Intervals for Binomial Proportion: A SAS 9.4/STAT 12.3 Update

After getting the access to SAS 9.4 alone with SAS/STAT 12.3, I first took a look at my favorite SAS statistical procedure, PROF FREQ.  Last year I had a note on confidence intervals for binomial proportion based on SAS 9.2/SAS9.3. Now it’s time to throw out some updates.

1. A new confidence limits method added, Wilson (Corrected)

In my previous post, SAS PROC FREQ computed 6 of the 11 intervals (#1, 2, 3, 5, 8, 9; see my macros, CI_Single_Proportion.sas). Since SAS 9.4/STAT 12.3, #4 added:

data test;
input grp outcome $ count;
datalines;
1 f 81
1 u 182
;

ods select BinomialCLs;
proc freq data=test;
    tables outcome / binomial (CL=ALL);
    weight Count;
run;

ods select BinomialCLs;
proc freq data=test;
    tables outcome / binomialc (CL=ALL);
    weight Count;
run;

CI_9.4CI_c_9.4

2. The binomialc option is no longer documented, but still works

In the above session, a binomialc option was used to compute the intervals with a continuity correction(CC). Actually it still works in SAS 9.4/STAT 12.3 but without documentation (it’s in SAS 9.2 and SAS 9.3). Instead, a CORRECT options is used for continuity correction:

ods select BinomialCLs;
proc freq data=test;
    tables outcome / binomial (CORRECT CL=ALL);
    weight Count;
run;

Also, you can use it this way to only compute intervals with CC:

ods select BinomialCLs;
proc freq data=test;
    tables outcome / binomial (CL=W(CORRECT) WALD(CORRECT));
    weight Count;
run;