How to make a table for MEANS Procedure results?

Accepted Solution Solved
Reply
Regular Contributor
Posts: 161
Accepted Solution

How to make a table for MEANS Procedure results?

[ Edited ]

Hello everybody,

I want to make a table of a result of the mean procedure. I use codes below to run the mean statemant:

proc means data=have;
   var x;
   class name time;
run;

So, I want a table which keeps name, time and means of x variable as listed in the following table:

nametimemean_x
A112
A213
A312
A416
A59
B111
B212
B312
B414
B57
C111
C214
C313
C417
C511

 

How can I do that?

Thanks in advance.


Accepted Solutions
Solution
‎09-06-2017 08:07 PM
Super User
Posts: 11,578

Re: How to make a table for MEANS Procedure results?

Posted in reply to aminkarimid

This should work:

proc means data=have mean nway;
   var x;
   class name time;
   output out=want (drop= _: ) mean=mean_x;
run;

View solution in original post


All Replies
Solution
‎09-06-2017 08:07 PM
Super User
Posts: 11,578

Re: How to make a table for MEANS Procedure results?

Posted in reply to aminkarimid

This should work:

proc means data=have mean nway;
   var x;
   class name time;
   output out=want (drop= _: ) mean=mean_x;
run;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 86 views
  • 0 likes
  • 2 in conversation