The GLMPOWER Procedure

Contrasts in Fixed-Effect Univariate Models

The univariate linear model has the form

\[  \mb {y} = \mb {X} \bbeta + \bepsilon  \]

where $\mb {y}$ is the $N \times 1$ vector of responses, $\mb {X}$ is the $N \times p$ design matrix, $\bbeta $ is the $p \times 1$ vector of model parameters corresponding to the columns of $\mb {X}$, and $\bepsilon $ is an $N \times 1$ vector of errors with

\[  \epsilon _1, \ldots , \epsilon _ N \sim \mr {N}(0,\sigma ^2) \quad \mr {(i.i.d.)}  \]

In PROC GLMPOWER, the model parameters $\bbeta $ are not specified directly, but rather indirectly as $\mb {y^\star }$, which represents either conjectured response means or typical response values for each design profile. The $\mb {y^\star }$ values are manifested as the dependent variable in the MODEL statement. The vector $\bbeta $ is obtained from $\mb {y^\star }$ according to the least squares equation,

\[  \bbeta = (\mb {X}’\mb {X})^{-1}\mb {X}’ \mb {y^\star }  \]

Note that, in general, there is not a 1-to-1 mapping between $\mb {y^\star }$ and $\bbeta $. Many different scenarios for $\mb {y^\star }$ might lead to the same $\bbeta $. If you specify $\mb {y^\star }$ with the intention of representing cell means, keep in mind that PROC GLMPOWER allows scenarios that are not valid cell means according to the model specified in the MODEL statement. For example, if $\mb {y^\star }$ exhibits an interaction effect but the corresponding interaction term is left out of the model, then the cell means ($\mb {X} \bbeta $) derived from $\bbeta $ differ from $\mb {y^\star }$. In particular, the cell means thus derived are the projection of $\mb {y^\star }$ onto the model space.

It is convenient in power analysis to parameterize the design matrix $\mb {X}$ in three parts, $\{ \ddot{\mb {X}}, \mb {w}, N\} $, defined as follows:

  1. The $q \times p$ essence design matrix $\ddot{\mb {X}}$ is the collection of unique rows of $\mb {X}$. Its rows are sometimes referred to as design profiles. Here, $q \le N$ is defined simply as the number of unique rows of $\mb {X}$.

  2. The $q \times 1$ weight vector $\mb {w}$ reveals the relative proportions of design profiles. Row i of $\ddot{\mb {X}}$ is to be included in the design $w_ i$ times for every $w_ j$ times row j is included. The weights are assumed to be standardized (that is, sum up to 1).

  3. The total sample size is N. This is the number of rows in $\mb {X}$. If you gather $N w_ i = n_ i$ copies of the $i\mr {th}$ row of $\ddot{\mb {X}}$, for $i = 1,\ldots ,q$, then you end up with $\mb {X}$.

It is useful to express the crossproduct matrix $\mb {X}’\mb {X}$ in terms of these three parts,

\[  \mb {X}’\mb {X} = N \ddot{\mb {X}}’ \mr {diag}(\mb {w}) \ddot{\mb {X}}  \]

since this factors out the portion (N) depending on sample size and the portion ($\ddot{\mb {X}}’ \mr {diag}(\mb {w}) \ddot{\mb {X}}$) depending only on the design structure.

A general linear hypothesis for the univariate model has the form

$\displaystyle  H_0\colon  $
$\displaystyle \mb {L} \bbeta = \btheta _0  $
$\displaystyle H_ A\colon  $
$\displaystyle \mb {L} \bbeta \ne \btheta _0  $

where $\mb {L}$ is an $r_ L \times p$ contrast matrix (assumed to be full rank) and $\btheta _0$ is the null value (usually just a vector of zeros). Note that effect tests are just contrasts that use special forms of $\mb {L}$. Thus, this scheme covers both effect tests and custom contrasts.

The test statistic is

\[  F = \frac{\left(\frac{\mr {SS_ H}}{r_ L}\right)}{\hat{\sigma }^2}  \]


$\displaystyle  \mr {SS_ H}  $
$\displaystyle = \frac{1}{N} \left(\mb {L} \hat{\bbeta } - \btheta _0 \right)’\left(\mb {L} \left(\mb {X}’\mb {X}\right)^{-1} \mb {L}^\prime \right)^{-1} \left(\mb {L} \hat{\bbeta } - \btheta _0 \right)  $
$\displaystyle \hat{\bbeta }  $
$\displaystyle = (\mb {X}’\mb {X})^{-1}\mb {X}’ \mb {y}  $
$\displaystyle \hat{\sigma }^2  $
$\displaystyle = \frac{1}{\textrm{DF}_\textrm {E}} \left( \mb {y} - \mb {X} \hat{\bbeta } \right)’ \left( \mb {y} - \mb {X} \hat{\bbeta } \right)  $

where $\mr {DF}_\mr {E} = N - \mr {rank}(\mb {X})$. Note that $\mr {DF}_\mr {E} = N - p$ if $\mb {X}$ has full rank.

Under $H_0$, $F \sim F(r_ L, \mr {DF}_\mr {E})$. Under $H_ A$, F is distributed as $F(r_ L, \mr {DF}_\mr {E}, \lambda )$ with noncentrality

\[  \lambda = N \left(\mb {L} \bbeta - \btheta _0 \right)’\left(\mb {L} \left(\ddot{\mb {X}}’ \mr {diag}(\mb {w}) \ddot{\mb {X}} \right)^{-1} \mb {L}^\prime \right)^{-1} \left(\mb {L} \bbeta - \btheta _0 \right) \sigma ^{-2}  \]

Muller and Peterson (1984) give the exact power of the test as

\[  \mr {power} = P\left(F(r_ L, \mr {DF}_\mr {E}, \lambda ) \ge F_{1-\alpha }(r_ L, \mr {DF}_\mr {E})\right)  \]

Sample size is computed by inverting the power equation.

See Muller and Benignus (1992) and O’Brien and Shieh (1992) for additional discussion.