Previous Page | Next Page

The SURVEYLOGISTIC Procedure

CLASS Statement
CLASS variable <(v-options)> <variable <(v-options)> ...> </ v-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 v-options for each variable by enclosing them in parentheses after the variable name. You can also specify global v-options for the CLASS statement by placing them after a slash (/). Global v-options are applied to all the variables specified in the CLASS statement. However, individual CLASS variable v-options override the global v-options.

CPREFIX= n

specifies that, at most, the first n characters of a CLASS variable name be used in creating names for the corresponding dummy variables. The default is , where is the formatted length of the CLASS variable.

DESCENDING
DESC

reverses the sorting order of the classification variable.

LPREFIX= n

specifies that, at most, the first n characters of a CLASS variable label be used in creating labels for the corresponding dummy variables.

ORDER=DATA | FORMATTED | FREQ | INTERNAL

specifies the order in which to sort the levels of the classification variables (which are specified in the CLASS statement). This option applies to the levels for all classification variables, except when you use the (default) ORDER=FORMATTED option with numeric classification variables that have no explicit format. With this option, the levels of such variables are ordered by their internal value.

The ORDER= option can take the following values:

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.

Note that the specified order also determines the ordering for levels of the STRATA, CLUSTER, and DOMAIN variables.

For more information about sorting order, see the chapter on the SORT procedure in the Base SAS Procedures Guide and the discussion of BY-group processing in SAS Language Reference: Concepts.

PARAM=keyword

specifies the parameterization method for the classification variable or variables. Design matrix columns are created from CLASS variables according to the following coding schemes; the default is PARAM=EFFECT.

EFFECT

specifies effect coding

GLM

specifies less-than-full-rank, reference cell coding; this option can be used only as a global option

ORDINAL

specifies the cumulative parameterization for an ordinal CLASS variable

POLYNOMIAL | POLY

specifies polynomial coding

REFERENCE | REF

specifies reference cell coding

ORTHEFFECT

orthogonalizes PARAM=EFFECT

ORTHORDINAL | ORTHOTHERM

orthogonalizes PARAM=ORDINAL

ORTHPOLY

orthogonalizes PARAM=POLYNOMIAL

ORTHREF

orthogonalizes PARAM=REFERENCE

If PARAM=ORTHPOLY or PARAM=POLY, and the CLASS levels are numeric, then the ORDER= option in the CLASS statement is ignored, and the internal, unformatted values are used.

EFFECT, POLYNOMIAL, REFERENCE, ORDINAL, and their orthogonal parameterizations are full rank. The REF= option in the CLASS statement determines the reference level for EFFECT, REFERENCE, and their orthogonal parameterizations.

Parameter names for a CLASS predictor variable are constructed by concatenating the CLASS variable name with the CLASS levels. However, for the POLYNOMIAL and orthogonal parameterizations, parameter names are formed by concatenating the CLASS variable name and keywords that reflect the parameterization.

REF=’level’ | keyword

specifies the reference level for PARAM=EFFECT or PARAM=REFERENCE. For an individual (but not a global) variable REF= option, you can specify the level of the variable to use as the reference level. For a global or individual variable REF= option, you can use one of the following keywords. The default is REF=LAST.

FIRST

designates the first ordered level as reference

LAST

designates the last ordered level as reference

Previous Page | Next Page | Top of Page