caterpillar_plot: caterpillar_plot() it plots the rank of random effects across...

View source: R/caterpillar_plot.R

caterpillar_plotR Documentation

caterpillar_plot() it plots the rank of random effects across clusters, with ther point estimates and their uncertainty (2*SD), around it points estimates

Description

caterpillar_plot() it plots the rank of random effects across clusters, with ther point estimates and their uncertainty (2*SD), around it points estimates

Usage

caterpillar_plot(mlm_model)

Arguments

mlm_model

it requires an mlm_model, generated by lme4. If this is a null, the plot display the unconditioned random effect. If the model is not a null model, then the plot display the expected random effects given the model.

Details

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)

Value

a plot, a 'ggplot2' object.

Examples


lme4::lmer(y ~ 1 + (1|id_j), data = clustered_data, REML = FALSE) %>%
caterpillar_plot(.)



dacarras/r4sda documentation built on Nov. 9, 2023, 10:17 a.m.