BookmarkSubscribeRSS Feed
kll123
Calcite | Level 5

 Is it possible to plot multiple independent variables on a histogram, depicting frequencies?

 

To give more context in what I am trying to do, I would like to plot the number of HIV positive, HCV positive, Chlamydia positive, Gonnorhea positive, and Syphilis positive persons in one histogram. The issue is that I cannot collapse these into a categorical variable, since there is a lot of overlap (i.e., there are persons who are both HIV positive and HCV positive).

 

For now, I have 5 different variables (one for each disease) whose frequencies I would like to display side-by-side in a histogram.

 

Any help/advice would be appreciated!

1 REPLY 1
ballardw
Super User

You may need to clarify what you mean by "side by side". Is that 5 separate plots or one plot with 5 categories.

What is the value of your disease variables? Histogram normally is used to group into ranges to see patterns of a continuous variable?

It sounds more like you might be looking for a Vbar type chart where the height is a count (or sum of a 0/1 coded variable).

 

Providing an example data set (remove any sensitive information) so we can see what your current data looks like will help provide better answers.

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!

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
  • 1231 views
  • 1 like
  • 2 in conversation