BookmarkSubscribeRSS Feed
abdullala
Calcite | Level 5
what is the correct method and SAS procedure to calculate the 95% confidence interval of the difference of rates in 2 groups?

For example, group A has 28 subjects and 20 improved, group B has 14 subjects and 8 improved. So the improvement rate for group A is 20/28=71.4%, improvement rate for group B is 8/14=57.1%. The difference of rates is 0.14. what is the right way to calculate 95% CI for that?
1 REPLY 1
StatDave
SAS Super FREQ
Set it up as a 2 x 2 table in PROC FREQ and use the RISKDIFF option:

data a;
do group='A','B';
do response='Improved','Unimproved';
input f @@;
output;
end;
end;
datalines;
20 8
8 6
;
proc freq;
weight f;
table group*response / riskdiff;
run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1640 views
  • 0 likes
  • 2 in conversation