residuals.SMNclmm | R Documentation |
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.
## S3 method for class 'SMNclmm'
residuals(object, level = "conditional", ...)
object |
An object inheriting from class |
level |
Either |
... |
Additional arguments. |
Vector with the residuals of length equal to nrow(data)
.
The residuals are computed after imputing the censored observations.
Fernanda L. Schumacher, Larissa A. Matos, Victor H. Lachos and Katherine L. Valeriano
smn.clmm
, mahalDistCens
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.