Programming the statistical procedures from SAS

95% CI for ratios

Reply
Contributor
Posts: 74

95% CI for ratios

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?
SAS Employee
Posts: 242

Re: 95% CI for ratios

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;
Ask a Question
Discussion stats
  • 1 reply
  • 131 views
  • 0 likes
  • 2 in conversation