metafor (version 3.8-1)

methods.list.rma: Methods for 'list.rma' Objects

Description

Methods for objects of class "list.rma".

Usage

# S3 method for list.rma
as.data.frame(x, ...)
# S3 method for list.rma
as.matrix(x, ...)
# S3 method for list.rma
[(x, i, ...)
# S3 method for list.rma
head(x, n=6L, ...)
# S3 method for list.rma
tail(x, n=6L, ...)
# S3 method for list.rma
$(x, name) <- value

Arguments

x

an object of class "list.rma".

...

other arguments.

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

Examples

Run this code
### copy data into 'dat' and examine data
dat <- dat.viechtbauer2021

### calculate log odds ratios and corresponding sampling variances
dat <- escalc(measure="OR", ai=xTi, n1i=nTi, ci=xCi, n2i=nCi, add=1/2, to="all", data=dat)

### fit mixed-effects meta-regression model
res <- rma(yi, vi, mods = ~ dose, data=dat)

### get studentized residuals
sav <- rstudent(res)
sav

### studies with studentized residuals larger than +-1.96
sav[abs(sav$z) > 1.96,]

### variables specified are automatically searched for within the object itself
sav[abs(z) > 1.96,]

### note: this behavior is specific to 'rma.list' objects; this doesn't work for regular data frames

Run the code above in your browser using DataLab