02-12-2015 11:05 AM
I have a table:
I want to summarize the data to have this output
What is the quickest way to do it ?
02-12-2015 12:00 PM
Clearly, the quickest way would be to hire a consultant.
But if you want to program this yourself, you have to answer a few questions first.
What is your output? Is it a report, or is it a data set?
Is there any flexibility in the requirements? For example, there are going to be 6 numbers, and 3 repeats in your results. Do you need all 9 numbers in the output?
Do you want a program that is limited to these 3 variables, or do you need something that might expand to more variables?
02-12-2015 01:05 PM
In my real data I have 10 000 custnum (10 000 obs) and have 10 indicators. This table tell us which services each customers have use last year, I can summarize each indicators independantly(easy part). I would like to see in a report which combination of services were used.
I'll continue to work on this, maybe I should make up a class variable by combining my indicators and have proc summary.
I thought there was a Stat proc that could do this.
02-12-2015 01:12 PM
For three variables, it's easy to count all the combinations. PROC FREQ is the simplest counting tool:
proc freq data=have;
tables indicx * indicy * indicz / missing list;
See if this does what you need for three variables.
When you have larger numbers of variables, such as 10, this may not fit onto the page. You could increase the width of each line although there are limits and you may need to read the results on a browser not a printer:
... then run PROC FREQ.
Need further help from the community? Please ask a new question.