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!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.