Forest plots display estimated parameters from multiple sources (studies, participants, etc.) in one figure. They are most commonly used in meta-analysis, where individual studies are used to inform an average, or meta-analytic, overall estimate. However, they can be seamlessly applied to other types of multilevel models–models in which parameters are assumed to vary among units. brmstools’
forest() function draws forest plots from
brmsfit objects. They should be most useful for meta-analytic models, but can be produced from any
brmsfit with one or more varying parameters.
We illustrate using a data set from the metafor package.
brms allows flexible specification of meta-analytic models.
forest() to draw the forest plot:
There are various options (see
Data points can also be shown (note this probably only makes sense with a meta-analytic model):
forest() function can be seamlessly applied to any multilevel model.
We use example data from the lme4 package.
A multilevel model with varying intercepts and slopes (effect of
If there are multiple varying parameters, users can input a variable name:
Or let the function automatically draw a plot with all the variables:
You can also turn off the ridgeline plots (densities)