Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The GENMOD Procedure

CONTRAST Statement

CONTRAST 'label' effect values < ,...effect values > < /options > ;

The CONTRAST statement provides a means for obtaining a test for a specified hypothesis concerning the model parameters. This is accomplished by specifying a matrix L for testing the hypothesis {L^'{\beta}= 0}.You must be familiar with the details of the model parameterization that PROC GENMOD uses. For more information, see the section "Parameterization Used in PROC GENMOD". Computed statistics are based on the asymptotic chi-square distribution of the likelihood ratio statistic, or the generalized score statistic for GEE models, with degrees of freedom determined by the number of linearly independent rows in the L matrix. You can request Wald chi-square statistics with the Wald option in the CONTRAST statement.

There is no limit to the number of CONTRAST statements that you can specify, but they must appear after the MODEL statement. Statistics for multiple CONTRAST statements are displayed in a single table.

The following parameters are specified in the CONTRAST statement:
label
identifies the contrast on the output. A label is required for every contrast specified. Labels can be up to 20 characters and must be enclosed in single quotes.

effect
identifies an effect that appears in the MODEL statement. The value INTERCEPT or intercept can be used as an effect when an intercept is included in the model. You do not need to include all effects that are included in the MODEL statement.

values
are constants that are elements of the L vector associated with the effect.

The rows of L' are specified in order and are separated by commas. Each row is checked for estimability. If PROC GENMOD finds a contrast to be nonestimable, it displays missing values in corresponding rows in the results. Refer to Searle (1971) for a discussion of estimable functions.

If an effect is not specified in the CONTRAST statement, all of its coefficients in the L matrix are set to 0. If too many values are specified for an effect, the extra ones are ignored. If too few values are specified, the remaining ones are set to 0.

PROC GENMOD handles missing level combinations of classification variables in the same manner as the GLM and MIXED procedures. Parameters corresponding to missing level combinations are not included in the model. This convention can affect the way in which you specify the L matrix in your CONTRAST statement.

If the elements of L are not specified for an effect that contains a specified effect, then the elements of the specified effect are distributed over the levels of the higher-order effect just as the GLM procedure does for its CONTRAST and ESTIMATE statements. For example, suppose that the model contains effects A and B and their interaction A*B. If you specify a CONTRAST statement involving A alone, the L matrix contains nonzero terms for both A and A*B, since A*B contains A.

If you specify the WALD option, the test of hypothesis is based on a Wald chi-square statistic. If you omit the WALD option, the test statistic computed depends on whether an ordinary generalized linear model or a GEE-type model is specified.

For an ordinary generalized linear model, the CONTRAST statement computes the likelihood ratio statistic. This is defined to be twice the difference between the log likelihood of the model unconstrained by the contrast and the log likelihood with the model fitted under the constraint that the linear function of the parameters defined by the contrast is equal to 0. A p-value is computed based on the asymptotic chi-square distribution of the chi-square statistic.

If you specify a GEE model with the REPEATED statement, the test is based on a score statistic. The GEE model is fit under the constraint that the linear function of the parameters defined by the contrast is equal to 0. The score chi-square statistic is computed based on the generalized score function. See the "Generalized Score Statistics" section for more information.

The degrees of freedom is the number of linearly independent constraints implied by the CONTRAST statement, that is, the rank of L.

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

E
requests that the L matrix be displayed.

SINGULAR = number
tunes the estimability checking. If v is a vector, define ABS(v) to be the absolute value of the element of v with the largest absolute value. Define C to be equal to ABS(K') if ABS(K') is greater than 0; otherwise, C equals 1 for a row K' in the contrast. If ABS(K' - K'T) is greater than C*number, then K is declared nonestimable. T is the Hermite form matrix (X'X)-(X'X), and (X'X)- represents a generalized inverse of the matrix X'X. The value for number must be between 0 and 1; the default value is 1E-4.

WALD
requests that a Wald chi-square statistic be computed for the contrast rather than the default likelihood ratio or score statistic. The Wald statistic for testing {L^'{\beta}} = 0 is defined by
S = {(L^'{\hat{\beta}})^'(L^'
\Sigma L)^{-}(L^'{\hat{\beta}})}
where {\hat{\beta}} is the maximum likelihood estimate and {\Sigma} is its estimated covariance matrix. The asymptotic distribution of S is \chi^2_{r}, where r is the rank of L. Computed p-values are based on this distribution.

If you specify a GEE model with the REPEATED statement, {\Sigma} is the empirical covariance matrix estimate.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.