residualDiagnostics.merMod: residualDiagnostics methods for merMod objects

Description Usage Arguments Value Examples

View source: R/diagnostics.R

Description

residualDiagnostics methods for merMod objects

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'merMod'
residualDiagnostics(
  object,
  ev.perc = 0.001,
  robust = FALSE,
  distr = "normal",
  standardized = TRUE,
  ...
)

Arguments

object

An object with class merMod. Currently only lmer() models are supported.

ev.perc

The extreme value percentile to use. Defaults to .001.

robust

A logical value, whether to use robust estimates or not. Defaults to FALSE.

distr

A character string specifying the assumed distribution. Currently “normal”, but may expand in the future if glmer() models are supported.

standardized

A logical value whether to use standardized residual values or not. Defaults to TRUE.

...

Additional arguments. Not currently used.

Value

A logical (is.residualDiagnostics) or a residualDiagnostics object (list) for as.residualDiagnostics and residualDiagnostics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(JWileymisc)
sleep[1,1] <- NA
m <- lme4::lmer(extra ~ group + (1 | ID), data = sleep)

residualDiagnostics(m)$Residuals

#  gm1 <- lme4::glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
#    data = lme4::cbpp, family = binomial)
# residualDiagnostics(gm1) ## should be an error

rm(m, sleep)

multilevelTools documentation built on March 13, 2020, 2:07 a.m.