View source: R/caterpillar_mean_plot.R
caterpillar_mean_plot | R Documentation |
caterpillar_mean_plot() it plots the rank of random effects across clusters, with ther point estimates and their uncertainty (1.96*SD), around it points estimates
caterpillar_mean_plot(mlm_model)
mlm_model |
it requires an mlm_model, generated by lme4. If this is a null, the plot display the unconditioned random effect, plus its intercept. If the model is not a null model, then the plot display the expected random effects given the model plus its intercept or grand mean. |
Given the return object is a common 'ggplot2' user can further customize the figure, overwritting or defining parameter for the plot such as colours, axis lenght, and coord_fixed(ratio=.xx)
a plot, a 'ggplot2' object.
lme4::lmer(y ~ 1 + (1|id_j), data = clustered_data, REML = FALSE) %>%
caterpillar_mean_plot(.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.