The GLMPOWER Procedure

CONTRAST Statement

  • CONTRAST ’label’ effect values <…effect values> </ options>;

The CONTRAST statement enables you to define custom Type III hypothesis tests by specifying an $\mb{L}$ vector or matrix for testing either the hypothesis $\mb{L} \bbeta =0$ (for univariate models) or the hypothesis $\mb{L B M} = 0$ (for multivariate models). The $\mb{L}$ matrix consists of one or more between-subject contrasts.

To use this feature, you must be familiar with the details of the model parameterization that PROC GLM uses. For more information, see the section Parameterization of PROC GLM Models in Chapter 46: The GLM Procedure. All the elements of the $\mb{L}$ matrix can be given, or if only certain portions of the $\mb{L}$ matrix are given, PROC GLMPOWER constructs the remaining elements from the context (in a manner similar to that in rule 4 in the section Construction of Least Squares Means in Chapter 46: The GLM Procedure).

There is no limit to the number of CONTRAST statements that you can specify, but they must appear after the MODEL statement. Each power analysis includes tests for all CONTRAST statements.

You can specify the following arguments:


identifies the contrast in the output. A label is required for every contrast that is specified. Labels must be enclosed in single or double quotation marks.


identifies an effect that appears in the MODEL statement, or the INTERCEPT effect. You do not need to include all effects that appear in the MODEL statement.


are constants that are elements of the $\mb{L}$ matrix associated with the effect.

You can specify the following option in the CONTRAST statement after a slash (/):


tunes the estimability checking. If ABS$(\mb{L}-\mb{LH}) > C\times $ number for any row in the contrast, then $\mb{L}$ is declared nonestimable. $\mb{H}$ is the $(\mb{X}’\mb{X})^{-}\mb{X}’\mb{X}$ matrix, and C is ABS$(\mb{L})$ except for rows where $\mb{L}$ is zero, and then it is 1. The default value for the SINGULAR= option is $10^{-4}$. Values for the SINGULAR= option must be between 0 and 1.

As stated previously, the CONTRAST statement enables you to define custom hypothesis tests. If the hypothesis is testable in a univariate model, then the hypothesis sum of squares, SS($H_0\colon \mathbf{L} \bbeta =0$), is computed as

\[ (\mb{Lb})^{\prime }(\mb{L}(\mb{X^{\prime }X})^{-} \mb{L}^{\prime })^{-1}(\mb{Lb}) \]

where $\mb{b}=(\mb{X^{\prime }X})^{-}\mb{X^{\prime }y}$.

For testable hypotheses in a multivariate model, the usual multivariate tests are defined by using

\[ \mb{H} = \mb{M}’(\mb{LB})’ (\mb{L}(\mb{X'X})^{-} \mb{L}’)^{-1} (\mb{LB})\mb{M} \]

where $\mb{B}=(\mb{X'X})^{-}\mb{X'Y}$ and $\mb{Y}$ is the matrix of multivariate responses or dependent variables.

The degrees of freedom associated with the hypothesis are equal to the row rank of $\mb{L}$. The sum of squares computed in this situation is equivalent to the sum of squares computed using an $\mb{L}$ matrix with any row deleted that is a linear combination of previous rows.

Multiple-degrees-of-freedom hypotheses can be specified by separating the rows of the $\mb{L}$ matrix with commas.