Previous Page | Next Page

The GAM Procedure

CLASS Statement
CLASS variable <(options)> <variable <(options)> > </options> ;

The CLASS statement names the classification variables to be used in the analysis. The CLASS statement must precede the MODEL statement. You can specify various options for each variable by enclosing them in parentheses after the variable name. You can also specify global options for the CLASS statement by placing them after a slash (/). Global options are applied to all the variables specified in the CLASS statement. If you specify more than one CLASS statement, the global options specified on any one CLASS statement apply to all CLASS statements. However, individual CLASS variable options override the global options.

DESCENDING
DESC

reverses the sorting order of the classification variable. If both the DESCENDING and ORDER=  options are specified, PROC GAM orders the categories according to the ORDER=  option and then reverses that order.


ORDER=DATA | FORMATTED | FREQ | INTERNAL

specifies the sorting 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. The following table shows how PROC GAM interprets values of the ORDER= option.

Value of ORDER=

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

INTERNAL

Unformatted value

By default, ORDER=FORMATTED. For FORMATTED and INTERNAL, the sort order is machine-dependent. For more information on sorting order, see the chapter on the SORT procedure in the SAS Procedures Guide and the discussion of BY-group processing in SAS Language Reference: Concepts.

TRUNCATE<=n>

specifies the length of CLASS variable values to use in determining CLASS variable levels. If you specify TRUNCATE without the length , the first 16 characters of the formatted values are used. When formatted values are longer than 16 characters, you can use this option to revert to the levels as determined in releases previous to SAS 9. The default is to use the full formatted length of the CLASS variable. The TRUNCATE option is available only as a global option.

Previous Page | Next Page | Top of Page