hi ... yes you can get the same statistics with MEANS as you do with UNIVARIATE however, if you use UNIVARIATE and ODS OUTPUT to get the statistics into a SAS data set rather than the PROC option (OUTPUT OUT= ...) in either MEANS or UNIVARIATE, the data set orientation is different, for example ... ods listing close; ods output moments=ustat1 (keep=varname sex label1 nvalue1 where=(label1 in : ('N' 'Mean' 'Std'))); proc univariate data=sashelp.class; var height weight; class sex; run; ods output close; ods listing; gives you ... Var Obs Name Sex Label1 nValue1 1 Height F N 9.000000 2 Height F Mean 60.588889 3 Height F Std Deviation 5.018328 4 Height M N 10.000000 5 Height M Mean 63.910000 6 Height M Std Deviation 4.937937 7 Weight F N 9.000000 8 Weight F Mean 90.111111 9 Weight F Std Deviation 19.383914 10 Weight M N 10.000000 11 Weight M Mean 108.950000 12 Weight M Std Deviation 22.727186 while the follwoing ... proc univariate data=sashelp.class noprint; var height weight; class sex; output out=ustat2 n=n_ht n_wt mean=mean_ht mean_wt std=std_ht std_wt; run; gives you ... Obs Sex n_ht n_wt mean_ht mean_wt std_ht std_wt 1 F 9 9 60.5889 90.111 5.01833 19.3839 2 M 10 10 63.9100 108.950 4.93794 22.7272 (similar to what you would get with PROC MEANS output) the output you want depends on what comes next, what will you do with the data set (to get the output you wanted, I found it easier to use the ODS style output) one distinct advantage of the ODS output is that you do not have to provide all those variable names when using more tha one varaible in the VAR statement
... View more