I want to add a row at the bottom of this table with the mean for stop_length for all cases, so that it is easy to compare the overall mean with the means by class. How can I add a final summary row to this table?
proc means data=DATA stackodsoutput mean median mode stddev min max range ;
vars Stop_Length;
class TSOutcomeofStop;
title "Title";
run;
Do you want a table or displayed output?
Here's some examples of both:
proc means data=sashelp.cars stackodsoutput mean median mode stddev min max range ;
ways 0 1;
vars length;
class make;
title "Title";
ods output summary = want1;
run;
proc print data=want1;
run;
proc tabulate data=sashelp.cars out=want2;
class make;
var length;
table (all = 'Overall' make='') , length*(mean median mode stddev min max range);
run;
proc print data=want2;
run;
@ssryg wrote:
I want to add a row at the bottom of this table with the mean for stop_length for all cases, so that it is easy to compare the overall mean with the means by class. How can I add a final summary row to this table?
proc means data=DATA stackodsoutput mean median mode stddev min max range ;
vars Stop_Length;
class TSOutcomeofStop;
title "Title";
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.