BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sizmailyan
Calcite | Level 5

I cannot find the option to export the Klingenberg Confidence Limits or generate the risk difference plots using the COMMONRISKDIFF option in proc freq TABLES statement. Is there a way to accomplish this task?

 

thank you very much. 

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

The example below shows how to use the PLOTS= option to get the common risk difference plot with the Klingenberg CL.  It also demonstrates how to save the CL to a data set using an ODS OUTPUT statement.

 

data Migraine;
input Gender $ Treatment $ Response $ Count @@;
datalines;
female Active Better 16 female Active Same 11
female Placebo Better 5 female Placebo Same 20
male Active Better 12 male Active Same 16
male Placebo Better 7 male Placebo Same 19
;
ods graphics on;
proc freq data=Migraine;
tables Gender*Treatment*Response /riskdiff commonriskdiff(cl=k)
plots(only)=riskdiffplot(stats common=k);
weight Count;
title 'Clinical Trial for Treatment of Migraine Headaches';
ods output CommonPdiff=CRD_DS;
run;
ods graphics off;
proc print data=CRD_DS;
run;

View solution in original post

1 REPLY 1
SAS_Rob
SAS Employee

The example below shows how to use the PLOTS= option to get the common risk difference plot with the Klingenberg CL.  It also demonstrates how to save the CL to a data set using an ODS OUTPUT statement.

 

data Migraine;
input Gender $ Treatment $ Response $ Count @@;
datalines;
female Active Better 16 female Active Same 11
female Placebo Better 5 female Placebo Same 20
male Active Better 12 male Active Same 16
male Placebo Better 7 male Placebo Same 19
;
ods graphics on;
proc freq data=Migraine;
tables Gender*Treatment*Response /riskdiff commonriskdiff(cl=k)
plots(only)=riskdiffplot(stats common=k);
weight Count;
title 'Clinical Trial for Treatment of Migraine Headaches';
ods output CommonPdiff=CRD_DS;
run;
ods graphics off;
proc print data=CRD_DS;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 820 views
  • 3 likes
  • 2 in conversation