The QUANTSELECT Procedure (Experimental)

CLASS Statement

CLASS variable <(v-options)> <variable <(v-options …)> > </ v-options> <options> ;

The CLASS statement names the classification variables to be used in the analysis. The CLASS statement must precede the MODEL statement.

Table 78.6 summarizes the options and v-options available in the CLASS statement.

Table 78.6: CLASS Statement Options

option or v-option

Description

DELIMITER=

Specifies the delimiter

DESCENDING

Reverses the sort order

MISSING

Allows for missing values

ORDER=

Specifies the sort order

PARAM=

Specifies the parameterization method

REF=

Specifies the reference level

SHOW

Requests a table for each CLASS variable

SPLIT

Splits CLASS variables into independent effects


You can specify the following options after a slash (/):

DELIMITER=’c’

specifies the delimiter character, 'c', to be used between levels of classification variables when parameter names and lists of class level values are built. The default delimiter is a space. This option is useful if the levels of a classification variable contain embedded blanks.

SHOW | SHOWCODING

requests a table that shows the coding used for each classification variable.

You can specify various v-options for each variable by enclosing them in parentheses after the variable name; these are called individual v-options. You can also specify global v-options by placing them after a slash (/) at the end of the CLASS statement. Global v-options are applied to all the variables specified in the CLASS statement. If you specify more than one CLASS statement, the global v-options specified in any one CLASS statement apply to all CLASS statements. However, individual CLASS variable v-options override the global v-options.

You can specify the following v-options:

DESCENDING
DESC

reverses the sort order of the classification variable.

MISSING

allows missing values, such as . for a numeric variable or a blank for a character variable, as valid values for the CLASS variable.

ORDER=DATA | FORMATTED | FREQ | INTERNAL

specifies the sort order for the levels of classification variables. If ORDER=FORMATTED 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 QUANTSELECT 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 about sort order, see the chapter on the SORT procedure in the Bookrefprocguide 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=GLM. 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. See the section CLASS Variable Parameterization and the SPLIT Option in Chapter 45: The GLMSELECT Procedure, for more information.

EFFECT

specifies effect coding.

GLM

specifies less-than-full-rank coding. This option can be used only as a global v-option (after the slash in the CLASS statement).

ORDINAL | THERMOMETER

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.

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

REF=’level’ | FIRST | LAST

specifies the reference level for PARAM=EFFECT, PARAM=REFERENCE, and their orthogonalizations. For an individual (but not a global) REF= v-option, you can specify the level of the variable to use as the reference level. For a global or individual REF= v-option, you can specify REF=FIRST (which designates the first-ordered level as reference) or REF=LAST (which designates the last-ordered level as reference). The default is REF=LAST.

SPLIT

enables the columns of the design matrix that correspond to any effect that contains a split classification variable to be selected to enter or leave a model independently of the other design columns of that effect. For example, suppose a variable named temp has three levels with values hot, warm, and cold, and a variable named sex has two levels with values M and F. The following statements include SPLIT as a global v-option:

proc quantselect;
   class temp sex / split;
   model depVar = sex sex*temp;
run;

Because both the classification variables are split, the two effects named in the MODEL statement are split into eight effects. The effect sex is split into two effects labeled sex_M and sex_F. The effect sex*temp is split into six effects labeled sex_M*temp_hot, sex_F*temp_hot, sex_M*temp_warm, sex_F*temp_warm, sex_M*temp_cold, and sex_F*temp_cold. The previous PROC QUANTSELECT statements are equivalent to the following statements for the split version of the DATA= data set:

proc quantselect;
   model depVar =  sex_M sex_F sex_M*temp_hot  sex_F*temp_hot
                               sex_M*temp_warm sex_F*temp_warm
                               sex_M*temp_cold sex_F*temp_cold;
run;

You can specify the SPLIT option for individual classification variables. For example, consider the following PROC QUANTSELECT statements:

proc quantselect;
   class temp(split) sex;
   model depVar = sex sex*temp;
run;

In this case, the effect sex is not split, and the effect sex*temp is split into three effects labeled sex*temp_hot, sex*temp_warm, and sex*temp_cold. Furthermore each of these three split effects now has two parameters that correspond to the two levels of sex, and the previous PROC QUANTSELECT statements are equivalent to the following statements for the split version of the DATA= data set:

proc quantselect;
   class sex;
   model depVar = sex sex*temp_hot sex*temp_warm sex*temp_cold;
run;