Learn R Programming

metafor (version 1.9-4)

plot.rma.uni: Plot Method for 'rma' Objects

Description

Plot method for objects of class "rma.uni", "rma.mh", "rma.peto", and "rma.glmm".

Usage

## S3 method for class 'rma.uni':
plot(x, qqplot=FALSE, \dots)

## S3 method for class 'rma.mh':
plot(x, qqplot=FALSE, \dots)

## S3 method for class 'rma.peto':
plot(x, qqplot=FALSE, \dots)

## S3 method for class 'rma.glmm':
plot(x, qqplot=FALSE, \dots)

Arguments

x
an object of class "rma.uni", "rma.mh", or "rma.peto". The method is not yet implemented for objects of class "rma.glmm".
qqplot
logical indicating whether a normal QQ plot should be drawn (default is FALSE).
...
other arguments.

Details

Four plots are produced. If the model does not contain any moderators, then a forest plot, funnel plot, radial plot, and a plot of the standardized residuals is provided. If qqplot=TRUE, the last plot is replaced by a normal QQ plot of the standardized residuals. If the model contains moderators, then a forest plot, funnel plot, plot of the standardized residuals against the fitted values, and a plot of the standardized residuals is provided. If qqplot=TRUE, the last plot is replaced by a normal QQ plot of the standardized residuals.

References

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

See Also

forest, funnel, radial, qqnorm.rma.uni

Examples

Run this code
### load BCG vaccine data
data(dat.bcg)

### meta-analysis of the log relative risks using a random-effects model
res <- rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
plot(res, qqplot=TRUE)

### mixed-effects model with two moderators (absolute latitude and publication year)
res <- rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
           mods = ~ ablat + year, data=dat.bcg)
plot(res, qqplot=TRUE)

Run the code above in your browser using DataLab