Model Formulae for 'rma' Objects
The function extracts model formulae for objects of class "rma"
.
## S3 method for class 'rma' formula(x, type="mods", ...)
x |
an object of class |
type |
the formula which should be returned; either |
... |
other arguments. |
The requested formula.
Wolfgang Viechtbauer wvb@metafor-project.org http://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://www.jstatsoft.org/v036/i03.
### copy BCG vaccine 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, slab=paste(author, ", ", year, sep="")) ### mixed-effects meta-regression model res <- rma(yi, vi, mods = ~ ablat + alloc, data=dat) formula(res, type="mods") ### specify moderators via 'yi' argument res <- rma(yi ~ ablat + alloc, vi, data=dat) formula(res, type="yi")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.