Hi,
New to SAS. I need an idea on where to get started on creating a line graph based on #of subjects (y-axis) & month (x-axis). Shoud I use proc sgplot? Sorry, no example data here. Thanks!
An example:
proc sort data=sashelp.class out=sortedClass; by sex height;
run;
proc sgplot data=sortedClass noautolegend;
where sex="M";
reg x=height y=weight / lineattrs=(pattern=shortdash);
series x=height y=weight;
yaxis grid;
run;
An example:
proc sort data=sashelp.class out=sortedClass; by sex height;
run;
proc sgplot data=sortedClass noautolegend;
where sex="M";
reg x=height y=weight / lineattrs=(pattern=shortdash);
series x=height y=weight;
yaxis grid;
run;
One large hint if you have not worked with SAS and dates much: make sure that your "month" is actually a SAS date, meaning a numeric value with a SAS format applied that displays the date as desired.
Other forms of "date-like values" will either not sort properly (generally) or often have tickmarks way out of relation to as needed.
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.
Ready to level-up your skills? Choose your own adventure.