The MIXED Procedure

Residual Diagnostics

Consider a residual vector of the form \widetilde{{e}} = 
{P}{Y}, where P is a projection matrix, possibly an oblique projector. A typical element \widetilde{e}_i with variance vi and estimated variance \hat{v}_i is said to be standardized as

\frac{\widetilde{e}_i}{\sqrt{{{{\rm var}}}[\widetilde{e}_i]}} = 
 \frac{\widetilde{e}_i}{\sqrt{v_i}}
and studentized as
\frac{\widetilde{e}_i}{\sqrt{\hat{v}_i}}
External studentization uses an estimate of {{{\rm var}}}[\widetilde{e}_i] which does not involve the ith observation. Externally studentized residuals are often preferred over studentized residuals because they have well-known distributional properties in standard linear models for independent data.

Residuals that are scaled by the estimated variance of the response, i.e., \widetilde{e}_i/\sqrt{\hat{{{{\rm var}}}}[Y_i]}, are referred to as Pearson-type residuals.

Marginal and Conditional Residuals

The marginal and conditional means in the linear mixed model are \textup{E}[{Y}] = {X}{{{{{\beta}}}}} and \textup{E}[{Y}| 
{{{{{\gamma}}}}}] = {X}{{{{{\beta}}}}}+ {Z}{{{{{\gamma}}}}}, respectively. Accordingly, the vector rm of marginal residuals is defined as
{r}_m = {Y}- {X}\hat{{{{{{\beta}}}}}}
and the vector rc of conditional residuals is
{r}_c = {Y}- {X}\hat{{{{{{\beta}}}}}} - {Z}\hat{{{{{{\gamma}}}}}} = 
 {r}_m - {Z}\hat{{{{{{\gamma}}}}}}

Following Gregoire, Schabenberger, and Barrett (1995), let {Q}= {X}({X}'\hat{{V}}^{-1}{X})^{-}{X}' and {K}= {I}- {Z}\hat{{G}}{Z}'\hat{{V}}^{-1}. Then

\hat{{{{\rm var}}}}[{r}_m] &=& \hat{{V}} - {Q}\ 
 \hat{{{{\rm var}}}}[{r}_c] &=& {K}(\hat{{V}} - {Q}){K}'\

For an individual observation the raw, studentized, and Pearson residuals computed by the RESIDUAL option of the MODEL statement are given in the following table.

Type of Residual Marginal Conditional
Rawr_{mi} = Y_i - {x}'_i\hat{{{{{{\beta}}}}}}r_{ci} = r_{mi} - {z}'_i\hat{{{{{{\gamma}}}}}}
Studentizedr_{mi}^{student} = \frac{r_{mi}}{\sqrt{\hat{{{{\rm var}}}}[r_{mi}]}}r_{ci}^{student} = \frac{r_{ci}}{\sqrt{\hat{{{{\rm var}}}}[r_{ci}]}}
Pearsonr_{mi}^{pearson} = \frac{r_{mi}}{\sqrt{\hat{{{{\rm var}}}}[Y_i]}}r_{ci}^{pearson} = \frac{r_{ci}}{\sqrt{\hat{{{{\rm var}}}}[Y_i|{{{{{\gamma}}}}}]}}

When the OUTPM= option of the MODEL statement is specified in addition to the RESIDUAL option, rmi, rmistudent, and rmipearson are added to the data set as variables Resid, StudentResid, and PearsonResid, respectively. When the OUTP= option is specified, rci, rcistudent, and rcipearson are added to the data set.

Scaled Residuals

For correlated data, a set of scaled quantities can be defined through the Cholesky decomposition of the variance-covariance matrix. Since fitted residuals in linear models are rank-deficient, it is customary to draw on the variance-covariance matrix of the data. If var[ Y] = V and C' C = V, then C'-1 Y has uniform dispersion and its elements are uncorrelated.

Scaled residuals in a mixed model are meaningful for quantities based on the marginal distribution of the data. Let \hat{{C}} denote the Cholesky root of \hat{{V}}, so that \hat{{C}}'\hat{{C}} = \hat{{V}}, and define

{Y}_{c} &=& \hat{{C}}'^{-1}{Y}\ 
 {r}_{m(c)} &=& \hat{{C}}'^{-1}{r}_m
By analogy with other scalings, the inverse Cholesky decomposition can also be applied to the residual vector, \hat{{C}}'^{-1}{r}_m, although V is not the variance-covariance matrix of rm.

To diagnose whether the covariance structure of the model has been specified correctly can be difficult based on Yc, since the inverse Cholesky transformation affects the expected value of Yc. You can draw on rm(c) as a vector of (approximately) uncorrelated data with constant mean.

When the OUTPM= option of the MODEL statement is specified in addition to the VCIRY option, Yc is added as variable ScaledDep and rm(c) is added as ScaledResid to the data set.

Previous | Next | Top of Page