## Documentation Center |

`h = plotResiduals(___)`

`plotResiduals( lme,plottype)` plots
the raw conditional residuals of the linear mixed-effects model

`plotResiduals( lme,plottype,Name,Value)` also
plots the residuals of the linear mixed-effects model

`plotResiduals` also accepts some other name-value
pair arguments that specify the properties of the primary line in
the plot. For those name-value pairs, see `plot`.

` h = plotResiduals(___)` returns
a handle,

Conditional residuals include contributions from both fixed and random effects, whereas marginal residuals include contribution from only fixed effects.

Suppose the linear mixed-effects model `lme`has
an *n*-by-*p* fixed-effects design
matrix *X* and an *n*-by-*q* random-effects
design matrix *Z*. Also, suppose the *p*-by-1
estimated fixed-effects vector is
, and the *q*-by-1
estimated best linear unbiased predictor (BLUP) vector of random effects
is
. The fitted conditional response
is

and the fitted marginal response is

`residuals` can return three types of residuals:
raw, Pearson, and standardized. For any type, you can compute the
conditional or the marginal residuals. For example, the conditional
raw residual is

and the marginal raw residual is

For more information on other types of residuals, see the `ResidualType` name-value
pair argument.

Was this topic helpful?