I would appreciate if anyone can tell me the code to draw a histogram from the following qualitative data.
Do you know by any chance if there is a way to plot the days in the X axis only. I mean Instead of putting all dates, I want to put the days (Monday to Sunday) only. I am not sure if SAS can extract days from dates.
You new drawing looks like a Series plot. Series plots need two numeric variables: the date for the X axis and then -- in your case -- the frequency/day for the Y axis? You can use PROC FREQ or PROC SQL to calculate those frequencies, then feed that into a SERIES plot (using PROC SGPLOT and the SERIES statement), grouping it by YEAR.
You can find an index of great samples here:
Your instruction is working, but I have both year data for the month of February and March only. When I plot them with the following code it leaves a huge gap in the middle (from apr 2014 to jan 2015) of the X axis. Can you please help?
define statgraph tes1;
begingraph / subpixel=on;
entrytitle 'test title';
layout overlay / xaxisopts=(display=(ticks tickvalues))
seriesplot x=Start_date y=count / group=Visit_concern name='a' lineattrs=(thickness=1) smoothconnect=true;
scatterplot x=Start_date y=count / group=Visit_concern markerattrs=(symbol=circlefilled color=white size=1);
/*scatterplot x=Start_date y=count / group=Visit_concern markercharacter=label; --- this brings the circular data points*/
discretelegend 'a' / title='Legend' itemsize=(linelength=10px) location=inside across=1 halign=right valign=top;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.