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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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