Hi and happy new year everyone,
I would like to represent the structure of my data according a hierarchy of conditions.
For instance suppose I have summarised my data as follows.
data structure;
group='A '; N=100000; output;
group='A1 '; N=60000; output;
group='A11'; N=35000; output;
group='A12'; N=20000; output;
group='A13'; N=5000; output;
group='A2 '; N=40000; output;
group='A21'; N=30000; output;
group='A22'; N=10000; output;
run;
where the group A represent the whole dataset with 100000 observations, that can be partitioned in A1 ( which in turn can be partitioned in A11,A12,A13) and A2 ( which in turn can be partitioned in A21,A22) .
I would like to chart this structure as a tree as in the example.
I need a simple diagram with nodes and connectors and for each node the value of the variable group and, below it, the number of observations. the shape and the colors of the nodes are very welcome, but not strictly necessary.
Is there a proc to accomplish this or a "simple" way to program it?
thank you very much in advance
If you search here (and/or lexjansen.com for user group papers) for "CONSORT Diagram," you'll find some approaches.
e.g.
https://support.sas.com/resources/papers/proceedings19/3149-2019.pdf
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.