BookmarkSubscribeRSS Feed
vnoblet
Calcite | Level 5

Hello!

I am trying create a plot that includes both my unadjusted odds ratios and my adjusted odds ratios, both with 95% CI. I was about to create a plot of only my adjusted, but I do not know how to combine them. The unadjusted odds ratios were created in individual models. I am trying to create something that looks similar to this below!

Thanks

Image result for odds ratio plot adjusted unadjusted

2 REPLIES 2
ballardw
Super User

@vnoblet wrote:

Hello!

I am trying create a plot that includes both my unadjusted odds ratios and my adjusted odds ratios, both with 95% CI. I was about to create a plot of only my adjusted, but I do not know how to combine them. The unadjusted odds ratios were created in individual models. I am trying to create something that looks similar to this below!

Thanks

 


Example(s) of your existing data would likely help get a better solution and let us see what restructure may be most useful.

Likely you will need to make sure that your limits and ratios are in output data sets so they can be best combined. It isn't clear if your summaries are in separate data sets yet.

 

This link:

http://support.sas.com/kb/42/867.html

has one fully worked example with data, code and visual results of something similar to what you are doing, though a bit more complicated.

The addition of your reference line would be pretty simple once you get the basic structure down.

Ksharp
Super User
proc summary data=sashelp.heart nway;
class status sex ;
var weight;
output out=temp mean=mean lclm=low uclm=upper;
run;

proc sgplot data=temp;
scatter x=mean y=status/ group=sex groupdisplay=cluster clusterwidth=0.4
 xerrorlower=low  xerrorupper=upper markerattrs=(symbol=squarefilled);
 refline 150 / axis=x;
 yaxis  colorbands=even;
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1243 views
  • 0 likes
  • 3 in conversation