SAS day 8: Proc Freq Risk Difference
- What is Risk Difference?
- How to interpret Risk Difference Confidence Interval.
Risk Difference is used to compare the proportions of successes between two independent groups with respect to a binary outcome. (cancer remission).
If the outcome is continuous, we compare the difference in means instead.
where ( is the successes in group 1) ,
( is the successes in group 2).
H0 (Null Hypotheses) : : there is no difference in outcomes between Treatment A and Placebo.
|Treatment A||Treatment B||Placebo|
|Difference From Placebo||18||11.3|
|p-value for difference||0.0004||0.067|
|97.5% CI for Difference||(9.2,35,6)||(-2.2,22.3)|
We are 95% confident that the difference in proportion in Treatment A and Placebo is (9.2, 35.6), therefore we conclude the treatment outcome difference in success is significant.
Note: If we use the WALD option, we might get negative values for CI, which means, the difference is not significant.
PROC FREQ DATA=adtte;
where (trt01pn in (1 2 ));
BY avisitn ;
TABLES trt01pn*aval / riskdiff(cl=wald) alpha=0.025;
col1 = put(-riskdifference*100, 4.1);
keep avisitn col1;
Happy SAS Coding 😍!
Thanks very much to Renee 5, Shared the Risk Diff knowledge with me ! 🍉