addpoly: Add Polygons to Forest Plots

View source: R/addpoly.r

addpolyR Documentation

Add Polygons to Forest Plots

Description

Function to add polygons (sometimes called ‘diamonds’) to a forest plot, for example to indicate summary estimates for subgroups of studies or to indicate fitted/predicted values based on models involving moderators.

Usage

addpoly(x, ...)

Arguments

x

either an object of class "rma", an object of class "predict.rma", or the values at which polygons should be drawn. See ‘Details’.

...

other arguments.

Details

Currently, methods exist for three types of situations.

In the first case, object x is a fitted model coming from the rma.uni, rma.mh, rma.peto, rma.glmm, or rma.mv functions. The model must either be an equal- or a random-effects model, that is, the model should not contain any moderators. The corresponding method is addpoly.rma. It can be used to add a polygon to an existing forest plot (usually at the bottom), showing the summary estimate (with its confidence interval) based on the fitted model.

Alternatively, x can be an object of class "predict.rma" obtained with the predict function. In this case, polygons based on the predicted values are drawn. The corresponding method is addpoly.predict.rma.

Alternatively, object x can be a vector with values at which one or more polygons should be drawn. The corresponding method is addpoly.default.

Author(s)

Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org

References

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. ⁠https://doi.org/10.18637/jss.v036.i03⁠

See Also

addpoly.rma, addpoly.predict.rma, and addpoly.default for the specific method functions.

forest for functions to draw forest plots to which polygons can be added.


wviechtb/metafor documentation built on March 11, 2024, 11:45 a.m.