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

View source: R/plot.R

plot.rlmerModR Documentation

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("Fitted Values vs. Residuals", "Normal Q-Q vs. Residuals",
    "Normal Q-Q vs. Random Effects", "Scatterplot of Random Effects for Group \"%s\""),
  multiply.weights = FALSE,
  add.line = c("above", "below", "none"),
  ...
)

## 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.

add.line

add reference line to plots, use "above" or "below" to show the line above or below the points. Hide the line with "none".

...

passed on to geom_hline and geom_qq_line, to customize how the line is drawn.

ask

waits for user input before displaying each plot.

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").

Value

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

See Also

getME, ggplot

Examples

## Not run: 
  rfm <- rlmer(Yield ~ (1|Batch), Dyestuff)
  plot(rfm)
  fm <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
  plot.rlmerMod(fm)

## End(Not run)

kollerma/robustlmm documentation built on Jan. 14, 2024, 2:18 a.m.