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:
Value | BMI_category | Overweight | Obese |
Lipoprotein subclasses | . | ||
Extremely large VLDL particles | 1 | A | B |
Extremely large VLDL particles | 2 | A | B |
Very large VLDL | . | ||
Very large VLDL | 1 | A | B |
Very large VLDL | 2 | A | B |
Large VLDL | . | ||
Large VLDL | 1 | A | B |
Large VLDL | 2 | A | B |
Medium VLDL | . | ||
Medium VLDL | 1 | A | B |
Medium VLDL | 2 | A | B |
Small VLDL | . | ||
Small VLDL | 1 | A | B |
Small VLDL | 2 | A | B |
Very small VLDL | . | ||
Very small VLDL | 1 | A | B |
Very small VLDL | 2 | A | B |
IDL | . | ||
IDL | 1 | ||
IDL | 2 | ||
Large LDL | . | ||
Large LDL | 1 | ||
Large LDL | 2 | ||
Medium LDL | . | ||
Medium LDL | 1 | ||
Medium LDL | 2 |
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.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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.