residuals {skewlmm} | R Documentation |
Extract model residuals from smn.lmm and smsn.lmm objects
Description
The conditional residuals are obtained by subtracting the fitted values from the response vector, while the marginal residuals are obtained by subtracting only the fixed effects from the response vector.
Usage
## S3 method for class 'SMN'
residuals(object, level = "conditional", type = "response", ...)
## S3 method for class 'SMSN'
residuals(object, level = "conditional", type = "response", ...)
Arguments
object |
An object inheriting from class |
level |
Either |
type |
An optional character string specifying the type of residuals to be used. If |
... |
Additional arguments. |
Details
Modified residuals are useful when the variance is not finite, such as when \nu \le 2
for t or ST distributions, or when \nu \le 1
for SL or SSL distributions.
Value
Vector with the residuals of length equal to nrow(data)
.
Author(s)
Fernanda L. Schumacher, Larissa A. Matos and Victor H. Lachos
See Also
smn.lmm
, smsn.lmm
, acfresid
, mahalDist
, healy.plot
Examples
fm1 = smn.lmm(distance ~ age+Sex, data=nlme::Orthodont, groupVar="Subject")
residuals(fm1)
plot(fm1, useweight=FALSE)