Is there a way to put statistics on a PROC tabulate table next to each other instead of stacked on top of each other?

Viewed 44

I'm trying to make a proc tabulate table with statistics like "mean" and "standard deviation." However, when I make the table, the statistics are listed on top of each other (shown in the attached picture), and I'd like them side-by-side to make the table shorter. Is there a way to do this? Thank you!

enter image description here

1 Answers

Yes there is: Everything you specify before the comma comes in the rows.

proc tabulate data=sashelp.bweight;
  class Married MomEdLevel Boy;
  var MomWtGain Weight;
  table Married * MomEdLevel * (min p10 mean p90 max) , Boy * (MomWtGain Weight); 
run;
Related