ggcaterpillar: Caterpillar plot

Description Usage Arguments Details Examples

View source: R/ggplots.R

Description

Caterpillar plots for random effects models using ggplot.

Usage

1
ggcaterpillar(re, qq = TRUE, likeDotplot = TRUE)

Arguments

re

random effects from lmer object

qq

if TRUE, returns normal q/q plot; else returns caterpillar dotplot

likeDotplot

if TRUE, uses different scales for random effects, i.e., facet_wrap

Details

Behaves like qqmath and dotplot from the lattice package; also handles models with multiple correlated random effects

Examples

1
2
3
4
5
6
7
library('lme4')
fit <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)

ggcaterpillar(ranef(fit, condVar = TRUE))

## compare (requires lattice package)
lattice::qqmath(ranef(fit, condVar = TRUE))

raredd/plotr documentation built on Nov. 19, 2018, 11:02 a.m.