CONTRAST Keyword (CSGLM command)

The contrast types that may be specified on the CONTRAST keyword are described below.

The CSGLM procedure sorts levels of the factor in ascending order and defines the highest level as the last level. (If the factor is a string variable, the value of the highest level is locale-dependent.)

SIMPLE (value). Each level of the factor (except the highest level) is compared to the highest level. SIMPLE is the default contrast type if the COMPARE keyword is specified.

DEVIATION (value). Each level of the factor (except the highest level) is compared to the grand mean.

The DEVIATION keyword may be followed optionally by parentheses containing a value. Put the value inside a pair of quotation marks if the value is formatted (such as date or currency) or if the factor is of string type. If a value is specified, the factor level with that value is used as the omitted reference category. If the specified value does not exist in the data, a warning is issued and the highest level is used. For example: CSGLM y BY a … /EMMEANS TABLES=a COMPARE=a CONTRAST=DEVIATION(1). The specified contrast omits level 1 of A. Deviation contrasts are not orthogonal.

DIFFERENCE. Each level of the factor (except the lowest level) is compared to the mean of previous levels. In a balanced design, difference contrasts are orthogonal.

HELMERT. Each level of the factor (except the highest level) is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.

REPEATED. Each level of the factor (except the highest level) is compared to the previous level. Repeated contrasts are not orthogonal.

POLYNOMIAL (number list). Polynomial contrasts. The first degree of freedom contains the linear effect across the levels of the factor, the second contains the quadratic effect, and so on. By default, the levels are assumed to be equally spaced; the default metric is (1 2 . . . k), where k levels are involved.

Orthogonal contrasts are particularly useful. In a balanced design, contrasts are orthogonal if the sum of the coefficients in each contrast row is 0 and if, for any pair of contrast rows, the products of corresponding coefficients sum to 0.