methods.anova.rma {metafor} | R Documentation |
Methods for objects of class "anova.rma"
and "list.anova.rma"
.
## S3 method for class 'anova.rma' as.data.frame(x, ...) ## S3 method for class 'list.anova.rma' as.data.frame(x, ...)
x |
an object of class |
... |
other arguments. |
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' dat <- dat.bcg ### calculate log risk ratios and corresponding sampling variances dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat) ### fit mixed-effects meta-regression model res <- rma(yi, vi, mods = ~ alloc + ablat, data=dat) ### test the allocation factor sav <- anova(res, btt="alloc") sav ### turn object into a regular data frame as.data.frame(sav) ### test the contrast between levels random and systematic sav <- anova(res, X=c(0,1,-1,0)) sav ### turn object into a regular data frame as.data.frame(sav) ### fit random-effects model res0 <- rma(yi, vi, data=dat) ### LRT comparing the two models sav <- anova(res, res0, refit=TRUE) sav ### turn object into a regular data frame as.data.frame(sav)