hi Team,
I have counts(summarized for simplicity) of people who has diff diagnoses in different years
Year Cancer Aids diabetics
2008 55 32 40
2009 100 90 44
2010 44 88 33
How can I show graphically (boxplot) on the same page for comparison of the 3 years and 3 diagnoses as well
55 32 40 100 90 44 44 88 33
can aids diabetes can aids diabetes can aids diabetes
--------------------------------------------------------------------------------------------------------------
2008 2009 2010
Thanks
Your task might be easier or more flexible by transforming the data so you have
Year Diagnosis where Diagnosis takes the values of Cancer, AIDS and Diabetes.
You also need something other than a count variable to create a box plot though. Something that makes sense to plot the mean/median and quartiles such as person'ts medical expense, length of stay in hospital, time between diagnosis and some other event or a biometric such as cholesterol level.
The procedure would be SGPANEL with code something like
proc sgpanel data=have;
panelby year diagnosis /layout lattice;
vbox <measure>; /* or hbox depending on how you want your boxes to run*/
or
panelby year ;
vbox <measure> /category=diagnosis;
run;
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!
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.