methods.list.rma | R Documentation |
Methods for objects of class "list.rma"
.
## 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
x |
an object of class |
... |
other arguments. |
For the `[`
method, any variables specified as part of the i
argument will be searched for within object x
first (see ‘Examples’).
Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org
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
### 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.