model.matrix.rma {metafor} | R Documentation |
The function extracts the model matrix from objects of class "rma"
.
## S3 method for class 'rma' model.matrix(object, asdf, ...)
object |
an object of class |
asdf |
logical to specify whether the model matrix should be turned into a data frame (the default is |
... |
other arguments. |
The model matrix.
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
rma.uni
, rma.glmm
, and rma.mv
for functions to fit models for which a model matrix can be extracted.
fitted.rma
for a function to extract the fitted values.
### calculate log risk ratios and corresponding sampling variances dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) ### fit mixed-effects model with absolute latitude and publication year as moderators res <- rma(yi, vi, mods = ~ ablat + year, data=dat) ### extract the model matrix model.matrix(res)