Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Basic Differences Between Proc MEANS and Proc SUMMARY

Proc SUMMARY and Proc MEANS are essentially the same procedure. Both procedures compute descriptive statistics. The main difference concerns the default type of output they produce. Proc MEANS by default produces printed output in the LISTING window or other open destination whereas Proc SUMMARY does not. Inclusion of the print option on the Proc SUMMARY statement will output results to the output window.

The second difference between the two procedures is reflected in the omission of the VAR statement. When all variables in the data set are character the same output: a simple count of observations, is produced for each procedure. However, when some variables in the dataset are numeric, Proc MEANS analyses all numeric variables not listed in any of the other statements and produces default statistics for these variables (N, Mean, Standard Deviation, Minimum and Maximum).

Using the SASHELP data set SHOES the example reflecting this difference is shown.

proc means data = sashelp.shoes;
run;

Basic differences between Proc MEANS and Proc SUMMARY1

proc summary data = sashelp.shoes print; run;

Basic differences between Proc MEANS and Proc SUMMARY2

Inclusion of a VAR statement in both Proc MEANS and Proc SUMMARY, produces output that contains exactly the same default statistics.

Using the SASHELP data set SHOES the example reflecting this similarity is shown.

proc means data = sashelp.shoes;
  class product;
  var Returns;
run;

Basic differences between Proc MEANS and Proc SUMMARY3

proc summary data = sashelp.shoes print;
class product;
var Returns;
run;

Basic differences between Proc MEANS and Proc SUMMARY4