The CLASS statement names the classification variables to be used in the model. Typical classification variables are Treatment
, Sex
, Race
, Group
, and Replication
. If you use the CLASS statement, it must appear before the MODEL
statement.
Classification variables can be either character or numeric. By default, class levels are determined from the entire set of formatted values of the CLASS variables.
Note: Prior to SAS 9, class levels were determined by using no more than the first 16 characters of the formatted values. To revert to this previous behavior, you can use the TRUNCATE option in the CLASS statement.
In any case, 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 adjust the order of CLASS variable levels with the ORDER= option in the PROC GLM statement.
The GLM procedure displays a table that summarizes the CLASS variables and their levels. You can use this table to check the ordering of levels and, hence, of the corresponding parameters for main effects. If you need to check the ordering of parameters for interaction effects, use the E option in the MODEL , CONTRAST , ESTIMATE , or LSMEANS statement. See the section Parameterization of PROC GLM Models for more information.
You can specify the following REF= option to indicate how the levels of an individual classification variable are to be ordered by enclosing it in parentheses after the variable name:
You can specify the following global-options in the CLASS statement after a slash (/):