Thank you so much for your insight.
Hi Superman JP,
I saw "note=," parameter in version 1.3 but don't see your updated SAS Sankey macro code.
Looking forward to seeing how to use it exactly in Sankey document.
Thanks,
Here is an instruction how to get version 1.3 in a form of a SAS package:
https://github.com/SASPAC/sasplotter/blob/main/sasplotter.md#install
Here is a snippet how to add footnote and title:
*--------------------------------------------------------;
*sankey example;
*--------------------------------------------------------;
proc format;
value domainf
1="day0"
2="day30"
3="day60"
4="day120";
value nodef
0="Drug A"
1="Drug B"
2="Drug C"
3="Drug D"
4="Drug E"
;
run;
data raw;
usubjid+1;
input day0 day30 day60 day120;
format day0 day30 day60 day120 nodef.;
cards;
0 2 3 4
0 2 3 4
0 2 3 4
2 1 2 4
2 1 2 4
2 1 2 4
2 1 2 4
2 1 2 4
2 1 4 3
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
;
run;
*--------------------------------------------------------;
*basic sankey;
*--------------------------------------------------------;
ods graphics / height=15cm width=20cm imagefmt=png imagename="sankey_basic" noborder;
title "Bacic Sankey";
ods html;
%sankey(
data=raw,
domain=day0 day30 day60 day120,
domainfmt=domainf,
note=%nrstr(entrytitle 'your title here';
entryfootnote halign=left 'your footnote here';
entryfootnote halign=left 'your footnote here 2';)
);
We can even add more features for titles and footnotes with color and fond size.
Thanks,
Thanks to the ineffable Sanket chart I can apply to my project.
One more question here is how to get a weighted result if each observation is assigned a weighting value.
Thanks,
Thanks a lot for your insight.
I just curious if weight statement can be used in "proc freq" procedure of your macro code.
Happy data visualizing!
Cheers,
I only assume if we don't have any missing values for each observation.
Thanks,
You're correct.
From my survey data, I only create one weight value for each observation when any respondent gives his/her answers for Day 1 and Day 30 and Day 60.
Thanks,
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.