The MEANS Procedure |
See Also: | Discussion of id-group-specification in OUTPUT Statement. |
ID variable(s); |
Required Arguments |
identifies one or more variables from the input data set whose maximum values for groups of observations PROC MEANS includes in the output data set.
Selecting the Values of the ID Variables |
When you specify only one variable in the ID statement, the value of the ID variable for a given observation is the maximum (minimum) value found in the corresponding group of observations in the input data set. When you specify multiple variables in the ID statement, PROC MEANS selects the maximum value by processing the variables in the ID statement in the order that you list them. PROC MEANS determines which observation to use from all the ID variables by comparing the values of the first ID variable. If more than one observation contains the same maximum (minimum) ID value, then PROC MEANS uses the second and subsequent ID variable values as "tiebreakers." In any case, all ID values are taken from the same observation for any given BY group or classification level within a type.
See Sorting Orders for Character Variables for information on how PROC MEANS compares character values to determine the maximum value.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.