The SURVEYMEANS Procedure |
When you use an ODS output statement to create SAS data sets for certain tables in PROC SURVEYMEANS, there are two possible types of table structure for the output data sets: rectangular and stacking. A rectangular structure creates one observation for each analysis variable in the data set. A stacking structure creates only one observation in the output data set for all analysis variables.
Before SAS 9, the stacking table structure, similar to the table structure in PROC MEANS, was the default in PROC SURVEYMEANS. Since SAS 9, the new default is to produce a rectangular table in the output data sets. You can use the STACKING option to request that the procedure produce the output data sets by using a stacking table structure.
The STACKING option affects the following tables:
Domain
Ratio
Statistics
StrataInfo
Figure 86.6 and Figure 86.7 shows these two structures for analyzing the following data set:
data new; input sex$ x; datalines; M 12 F 5 M 13 F 23 F 11 ;
The following statements request the default rectangular structure of the output data set for the statistics table:
proc surveymeans data=new mean; ods output statistics=rectangle; run; proc print data=rectangle; run;
Figure 86.6 shows the rectangular structure.
The following statements specify the STACKING option to request that the output data set have a stacking structure:
proc surveymeans data=new mean stacking; ods output statistics=stacking; run; proc print data=stacking; run;
Figure 86.7 shows the stacking structure of the output data set for the statistics table requested by the STACKING option.
Copyright © SAS Institute, Inc. All Rights Reserved.