Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a dataset structured with 5 columns. Month, User, Num1, Num2, Num3.

I'm trying to calculate, for each Num1 Num2 and Num3, the mean, median, max, 25th and 75th percentile for each permutation of Month and User.

I have tried proc univariate but I can't do it without creating a macro and manual steps for each Month and User permutation.

My ideal output would then look like this, and separate outputs for Num1 Num2 Num3: http://i.imgur.com/YC67LV1.png

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
439 views
Welcome To Ask or Share your Answers For Others

1 Answer

PROC Means does what you want.

Here is an example with the SASHELP.SHOES example dataset.

ods html;
proc means data=sashelp.shoes mean median max p25 p75;
   class region product;
   var sales inventory returns;
run;
ods html close;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...