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 $$\widehat{\beta}$$, and the *q*-by-1
estimated best linear unbiased predictor (BLUP) vector of random effects
is $$\widehat{b}$$. 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.