residuals.SMNclmm {skewlmm} | R Documentation |
Extract model residuals from smn.clmm 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.
Censored values are imputed using their conditional expectation from the fitting algorithm.
Usage
## S3 method for class 'SMNclmm'
residuals(object, level = "conditional", ...)
Arguments
object |
An object inheriting from class |
level |
Either |
... |
Additional arguments. |
Value
Vector with the residuals of length equal to nrow(data)
.
Note
The residuals are computed after imputing the censored observations.
Author(s)
Fernanda L. Schumacher, Larissa A. Matos, Victor H. Lachos and Katherine L. Valeriano
See Also
Examples
nj1 = 5; m = 30
time = rep(1:nj1, times=m)
groups = as.factor(rep(1:m, each=nj1))
dat1 = rsmsn.clmm(time, groups, cbind(1,time), rep(1,m*nj1), sigma2=0.7,
D=0.6*diag(1), beta=c(1,2), depStruct="CS", phi=0.4)
fm1 = smn.clmm(dat1, formFixed=y~x, groupVar="ind", depStruct="CS", ci="ci",
lcl="lcl", ucl="ucl", control=lmmControl(max.iter=30))
residuals(fm1)
[Package skewlmm version 1.1.0 Index]