Learn R Programming

robustlmm (version 1.4-2)

plot.rlmerMod: Plot Method for "rlmerMod" objects.

Description

Diagnostic plots for objects of class rlmerMod and lmerMod.

Usage

## S3 method for class 'rlmerMod':
plot(x, y = NULL, which = 1:4, 
    title = c("Response vs. Fitted Values", 
              "Normal Q-Q vs. Residuals", 
              "Normal Q-Q vs. Random Effects",
              "Scatterplot of Random Effects for Group \"\%s\""),
    multiply.weights = FALSE, ...)

## S3 method for class 'rlmerMod_plots': print(x, ask = interactive() & length(x) > 1, ...)

Arguments

x
an object as created by rlmer or rlmer; or an object as created by plot.rlmerMod
y
currently ignored.
which
integer number between 1 and 4 to specify which plot is desired.
title
Titles for the different plots. The fourth item can be a format string passed to sprintf to add the name of the current group.
multiply.weights
multiply the residuals / random effects with the robustness weights when producing the Q-Q plots.
ask
waits for user input before displaying each plot.
...
currently ignored.

Value

  • a list of plots of class ggplot that can be used for further modification before plotting (using print).

Details

The robustness weights for estimating the fixed and random effects are used in the plots, e.g., the ones returned by getME(object, "w_e") and getME(object, "w_b").

See Also

getME, ggplot

Examples

Run this code
rfm <- rlmer(Yield ~ (1|Batch), Dyestuff)
plot(rfm)
fm <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
plot.rlmerMod(fm)

Run the code above in your browser using DataLab