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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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