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

methods.list.rmaR Documentation

Methods for 'list.rma' Objects

Description

Methods for objects of class "list.rma".

Usage

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

Arguments

x

an object of class "list.rma".

...

other arguments.

Note

For the `[` method, any variables specified as part of the i argument will be searched for within object x first (see ‘Examples’).

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⁠

Examples

### 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

metafor documentation built on May 29, 2024, 7:44 a.m.