HI everyone,
I am trying to create a report using proc freq:
PROC FREQ DATA=WORK.PICKSTA ORDER=FREQ FORMCHAR (1,2,7)=' ';
TABLE PART*WBC / OUT=WORK.FREQWBC NOPCT NOROW NOCOL;
Output:
PART WBC
Frequency I P S A J K D H C F E Total
RE539279 48 1 7 0 0 0 0 0 0 0 0 56
AM106627 52 0 0 0 0 0 0 0 0 0 0 52
AL213212 35 0 1 0 0 0 0 0 0 0 0 36
AL172780 16 0 2 0 12 0 0 0 0 0 0 30
Is it possible to create a similar output but additionally use subgroups? The output should be:
´
PART Subgoup WBC
Frequency I P S A J K D H C F E Total
RE539279 A 48 1 7 0 0 0 0 0 0 0 0 56
B 0 1 0 0 0 0 0 0 0 0 0 1
AM106627 A 52 0 0 0 0 0 0 0 0 0 0 52
C 0 1 0 0 0 0 0 0 0 0 0 1
D 0 1 0 0 0 0 0 0 0 0 0 1
I tried to use the option LIST but this is not what I want. I need a table like above, where I have data displayed in a matrix form.
Is there a possibility to create such a table?
Thanks!!
Here's the link to my original question with Ballardw's responses
As far as I am aware, or at least this is how I've done it for my projects,
the only alternative when you dislike the output layout of proc freq LIST for nway contingency tables is to use proc tabulate.
I will try to find a link to it. I had posted a similar question and Ballardw had provided a very helpful response as to how to write proc tabulate to generate the nway effect. Otherwise, I simply recommend you start by reading the sas documentation about it and come back with additionnal questions on how to code the proc tabulate to achieve your output.
Vincent
Here's the link to my original question with Ballardw's responses
Thank you, that's what I was looking for!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.