New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
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;

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 1573 views
  • 0 likes
  • 3 in conversation