This is a shiny app for model diagnostic of mixed model using lmer function from lme4 package. This app includes a residual plot computed from six types of residuals (conditional raw, Pearson, and studentized, marginal raw, Pearson, and studentized) and normal quantile plot using of random effect and error term. This app can also be used to do model selection through pairwise comparison two models from different linear mixed models using lmer function.

launch_redres(model)

Arguments

model

A model (or two models wrapped in a list) fit using lmer.

Value

A Shiny app with multiple tabs showing diagnostic plots.

Examples

# NOT RUN {
# fits a linear mixed effects model
library(lme4)
fm1 <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
launch_redres(model = fm1)
# comparing two different linear mixed effects models
fm1 <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
cmbd <- c(fm1,fm2)
launch_redres(model = cmbd)
# }