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?
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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.