@ballardw wrote:
As an addendum to @PaigeMiller about choosing the correct procedure.
Consider that I want a data where I have 3 categorical variables, for reference call them Cat1 cat2 and Cat3.
I also have 25 analysis variables, v1 through v25, where I want the min, max, median, mode, std, interquartile range, p5 and p95.
For combinations of the categorical variables: 1) none, the data set overall3 2) each level of Cat1 alone; 3) each level of Cat2 alone; 4) each level of Cat3 alone; 5) combinations of cat1 and cat2; 6) combinations of Cat1 and Cat3; 7)combinations of Cat2 and Cat3 and 8)combinations of cat1 and cat2 and cat3.
With proc sql (or sql in general) that mean 8 group by so likely 8 separate create table possibly with a union all of some sort that will likely take some time to get working. With 25 variables and 8 statistics (if sql did mode) that would be 25*8 statements like <stat>(varn) as result name.
I have seen people try to do this in SQL, and then they decide that macros are the right approach, but they don't know enough to use macros here, and then they get stuck. For some reason, many of them seem resistant to PROC SUMMARY, which is the perfect tool.
... View more