Hi there,
following code (copied from somewhere in this forum) does a 100% stacked bar chart on month and sell, but I want to do it on month and grp, can anyone tell me the code for that. I know I may have to do a freq table first, but no idea how that freq table will be helpful.
data in2;
input grp $ sell month $;
datalines;
shoes 882 Jan
shoes 280 Feb
shoes 602 Mar
shoes 223 Apr
shoes 221 May
shoes 842 Jun
socks 280 Jan
socks 633 Feb
socks 465 Mar
socks 625 Apr
socks 104 May
socks 403 Jun
tee 763 Jan
tee 637 Feb
tee 141 Mar
tee 102 Apr
tee 663 May
tee 98 Jun
;
/* Suppress the group axis label and values */
axis1 label=none value=none;
/* Angle the label for the response axis */
axis2 label=(angle=90 'Percent');
proc gchart data=in2;
vbar month / discrete subgroup=grp
group=month g100 nozero
freq=sell type=percent
inside=percent width=20
gaxis=axis1 raxis=axis2 ;
run;
quit;
Thanks,
Stacked 100% tends to imply that you have a subgroup variable that would be indicated in the chart. What variable would that be? Sell doesn't make much sense in this case.
I would look here: Support.sas.com
and here: http://robslink.com/SAS/
to find something that looks like the result I wanted and use that as a model.
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!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.