modelDiagnostics.lme {multilevelTools} | R Documentation |
modelDiagnostics method for lme objects
Description
This function creates a number of diagnostics
for lme
models.
Usage
## S3 method for class 'lme'
modelDiagnostics(
object,
ev.perc = 0.001,
robust = FALSE,
distr = "normal",
standardized = TRUE,
...
)
Arguments
object |
A fitted model object of class lme. |
ev.perc |
A real number between 0 and 1 indicating the proportion of the theoretical distribution beyond which values are considered extreme values (possible outliers). Defaults to .001. |
robust |
Whether to use robust mean and standard deviation estimates for normal distribution |
distr |
A character string given the assumed distribution.
Passed on to |
standardized |
A logical whether to use standardized pearson residuals.
Defaults to |
... |
Additional arguments, not currently used. |
Value
A logical (is.modelDiagnostics
) or
a modelDiagnostics object (list) for
as.modelDiagnostics
and modelDiagnostics
.
Examples
library(JWileymisc)
sleep[1,1] <- NA
m <- nlme::lme(extra ~ group, data = sleep,
random = ~ 1 | ID, na.action = "na.omit")
md <- modelDiagnostics(m, ev.perc = .1)
md$extremeValues
plot(md)
data(aces_daily, package = "JWileymisc")
m <- nlme::lme(PosAff ~ STRESS, data = aces_daily,
random = ~ 1 + STRESS | UserID, na.action = "na.omit")
md <- modelDiagnostics(m, ev.perc = .001)
md$extremeValues
plot(md)
m <- nlme::lme(extra ~ 1, data = sleep, random = ~ 1 | ID/group,
na.action = "na.omit")
md <- modelDiagnostics(m, ev.perc = .1)
md$extremeValues
plot(md)
rm(m, md, sleep)
[Package multilevelTools version 0.1.1 Index]