Interview Questions   Tutorials   Discussions   Programs   Videos   

SAS - What is the difference between proc means and proc summary?




692
views
asked mar September 20, 2014 06:30 AM  

What is the difference between proc means and proc summary?


           

1 Answers



 
answered By vishnoiprem   0  

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;

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;
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert