The ADAPTIVEREG Procedure

CLASS Statement

  • CLASS variables </ options>;

The CLASS statement names the classification variables to be used in the analysis. Typical CLASS variables are Treatment, Sex, Race, Group, and Replication. If the CLASS statement is used, it must appear before the MODEL statement.

Classification variables can be either character or numeric. Class levels are determined from the formatted values of the variables. Thus, you can use formats to group values into levels. See the discussion of the FORMAT procedure in the Base SAS Procedures Guide and the discussions of the FORMAT statement and SAS formats in SAS Formats and Informats: Reference.

You can specify the following options for classification variables:

DESCENDING
DESC

reverses the sort order of the classification variable. If you specify both the DESCENDING and ORDER= options, PROC ADAPTIVEREG orders the categories according to the ORDER= option and then reverses that order.

ORDER=order-type

specifies the sort order for the categories of categorical variables. This ordering determines which parameters in the model correspond to each level in the data. When the default ORDER=FORMATTED is in effect for numeric variables for which you have supplied no explicit format, the levels are ordered by their internal values. Table 2 shows how PROC ADAPTIVEREG interprets values of the ORDER= option.

Table 2: Sort Order for Categorical Variables

order-type Levels Sorted By
DATA Order of appearance in the input data set
FORMATTED External formatted value, except for numeric variables with no explicit format, which are sorted by their unformatted (internal) value
FREQ Descending frequency count; levels with the most observations come first in the order
FREQDATA Order of descending frequency count, and within counts by order of appearance in the input data set when counts are tied
FREQFORMATTED Order of descending frequency count, and within counts by formatted value (as above) when counts are tied
FREQINTERNAL Order of descending frequency count, and within counts by unformatted value when counts are tied
INTERNAL Unformatted value


For the FORMATTED and INTERNAL values, the sort order is machine-dependent. If you specify the ORDER= option in the MODEL statement and the ORDER= option in the CLASS statement, the former takes precedence.

For more information about sort order, see the chapter on the SORT procedure in the Base SAS Procedures Guide and the discussion of BY-group processing in SAS Programmers Guide: Essentials.

Last updated: December 09, 2022