BookmarkSubscribeRSS Feed
Polina_UH
Obsidian | Level 7

I'm creating a forest plot and I want to mark those associations which remain significant after adjustments with the letters A and B.

 

My data relating to my question look like this:

 

ValueBMI_categoryOverweightObese
Lipoprotein subclasses.  
Extremely large VLDL particles1AB
Extremely large VLDL particles2AB
Very large VLDL.  
Very large VLDL1AB
Very large VLDL2AB
Large VLDL.  
Large VLDL1AB
Large VLDL2AB
Medium VLDL.  
Medium VLDL1AB
Medium VLDL2AB
Small VLDL.  
Small VLDL1AB
Small VLDL2AB
Very small VLDL.  
Very small VLDL1AB
Very small VLDL2AB
IDL.  
IDL1  
IDL2  
Large LDL.  
Large LDL1  
Large LDL2  
Medium LDL.  
Medium LDL1  
Medium LDL2  
 
 
Here is the line in sgplot code I'm trying to use to show associations with which biomarkers remain significant after adjustment for covariates
yaxistable overweight obese /location=outside position=left ;
But the code does not display the A and B values for each of the biomarkers separately, instead it groups them according to the level of the other variable in the dataset and I don't know how to display the A and B letters according to the values of each of the biomarkers.
 
I'm attaching the output to this post.
 
Thank you so much in advance for helping me figuring this out!
2 REPLIES 2
ballardw
Super User

You really should show the entire proc sgplot code as the issue could be related to something other than the yaxistable statement.

And a small example input data set in the form of data step code that would let us test things.

 

If the code filters the data, or you have a format applied to a variable or multiple variables that you are attempting to use for grouping are likely causes.

 

You can provide data step code by following this link: Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

You may need a different structure and I have to say that I am confused that you mean by Overweight=A and Obese=B when the record has a single BMI_category,especially since the only value for Overweight is A or missing and Obese is B or missing.

 

Polina_UH
Obsidian | Level 7
Hi, thank you for you reply, next time I post I will follow these instructions.

For now I found a solution: all I needed to do is to specify two yaxistable statements as follows:

yaxistable overweight/location=outside position=right class=overweight nolabel;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 690 views
  • 0 likes
  • 2 in conversation