1 min read

Statistical Notes (3B): Confidence Intervals for Binomial Proportion Using SAS, Updated

This quick note serves as a supplementnote of my previous Statistical Notes (3): Confidence Intervals for Binomial Proportion Using SAS which I will extend as a SESUG 2015 paper. Basically I added a new Blaker method to my CI_Single_Proportion.sas file and found more CIs from SAS PROC FREQ.

First of all, call the script:

filename CI url “https://raw.github.com/Jiangtang/Programming-SAS/master/CI_Single_Proportion.sas” ;
%include CI;

%CI_Single_Proportion(r=81,n=263);

and the output:

CI_SAS

The #12 is the one newly added. We can get the same results by SAS PROC FREQ (I use SAS/Base 9.4, TS1M2, WIN64):

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

ods select BinomialCLs;
proc freq data=test;
    tables outcome / binomial (CL=
                               WALD
                               WILSON
                               CLOPPERPEARSON
                               MIDP
                               LIKELIHOODRATIO
                               JEFFREYS
                               AGRESTICOULL
                               LOGIT
                               BLAKER 
                              );
    weight Count;
run;

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

the output:

CI_SAS_FREQ

Only #10 method is not implemented yet in SAS PROC FREQ. There are some Bayesian intervals available in SAS  procedures but since I’m not familiar with Bayes, I will leave it blank by far.