我记得by分类的话,结果是每组分开,没有样本整体分析。如果你有软件的话,运行一下,会发现结果的输出形式不一样。
找到了一个官方解释,看一下:
Comparison of the BY and CLASS Statements
Using the BY statement is similar to using the CLASS statement and the NWAY option in that PROC MEANS summarizes each BY group as an independent subset of the input data. Therefore, no overall summarization of the input data is available. However, unlike the CLASS statement, the BY statement requires that you previously sort BY variables.
When you use the NWAY option, PROC MEANS might encounter insufficient memory for the summarization of all the class variables. You can move some class variables to the BY statement. For maximum benefit, move class variables to the BY statement that are already sorted or that have the greatest number of unique values.
You can use the CLASS and BY statements together to analyze the data by the levels of class variables within BY groups.
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146731.htm#a000091561
|