Question

What exactly is the difference between Proc Means and Proc Summary? Many sites state that both these are same, but unless each has something unique will SAS create it?

Was it helpful?

Solution

@cmjohns gives the biggest difference...and from SAS discussion forum

"In earlier versions of SAS (SAS 5 and 6) PROC MEANS and PROC SUMMARY were separate procedures. Over time, by version 8, the code for the 2 procedures was standardized and "melded" together. There are essentially no differences except that MEANS creates output in the LISTING window or other open destinations, while SUMMARY creates an output dataset by default." (use the PRINT option in the Proc Summary statement to generate output)

Check the link Here

OTHER TIPS

My understanding is that the PROC SUMMARY code for producing an output data set is exactly the same as the code for producing an output data set with PROC MEANS. The difference between the two procedures is that PROC MEANS produces a report by default, whereas PROC SUMMARY produces an output data set by default. So if you want a report printed to the listing - use proc means - if you want the info passed to a data set for further use - proc summary may be a better choice.

I have come across situations in SAS 9.1.3 where proc means has had "out of memory" problems yet proc summary will still run the equivalent request just fine. Something to keep in mind if you ever run into this problem.

   **Proc Means**                               

->By Default Print the Output.
->By default gives variable name,
label name(if any), mean, no of non- missing values, std dev, min and max.
->By default take all the numeric
variables in to analysis.

   **Proc Summary**

-> By default does not print the output. -> By default gives only no of non-missing values. -> If specifying statistics function then have to specify the variable name with Var statement.

proc means : 1) The print option is set by default which displays output . 2) Omitting the var statement analyses all the numeric variable.

Proc Summary : 1) No print option is set by default,which displays no output. 2) Omitting the variable statement produces a simple count of observation.

Proc Means requires at least one numeric variable while proc FREQ has no such limitations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top