I want to create a histogram. Generally histogram gives counts/ frequency on the Y-axis and the variable on the histogram statement in Proc univariate on Y-axis. I was given a specific period(1 year) and asked to create a histogram for the length of stay(days) for the particular diagnosis code. There might be many patients with the same code in that year and have different length of stay as shown.
code LOStay month
500 3 feb11
500 6 mar12
501 2 apr11
501 1 aug11
501 1 sep11
501 5 jun11
thousands of data
I want to create a seperate histogram for each code.
i seperated each code into a seperate data set and did a proc univariate.
on x-axis i got LOS and on Y-axis i got percent
IS THERE A POSSIBILITY TO GET a histogram with MONTH ON X-axis and LOS days for a particular code on y-axis??????????
Thanks in advance
It sounds like you may want either PROC GCHART or SGPLOT.
And if you sort your data by the code, use a BY CODE statement to generate multiple plots instead of many datasets and calls to the proc.
It sounds like you may want either PROC GCHART or SGPLOT.
And if you sort your data by the code, use a BY CODE statement to generate multiple plots instead of many datasets and calls to the proc.
Thank you so very much for the answer. very helpful.....
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.