View source: R/caterpillarPlot.R
caterpillarPlot | R Documentation |
Plots empirical Bayes both point prediction and prediction intervals for each random effect parameter across all groups.
caterpillarPlot( model, grouping, title = print(grouping), tall = TRUE, grey = FALSE )
model |
A given lmer model. |
grouping |
The name of the grouping variable of interest, as a character string. |
title |
The title of the plot. |
tall |
Logical argument specifying whether the plot should be plotted vertically or horizontally. |
grey |
Logical argument specifying whether the intervals should be plotted in color or greyscale. |
Produces a caterpillar plot.
Rabe-Hesketh S, Skrondal A (2012). Multilevel and Longitudinal Modeling Using Stata, Volumes I and II, Third Edition. 3 edition edition. Stata Press. ISBN 978-1-59718-108-2.
# Read in data data(instruction) # Create model mod <- lme4::lmer(mathgain ~ (1 | classid), data = instruction) # Produce caterpillar plot caterpillarPlot(mod, title = "title", grouping = "classid", grey = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.