metafor (version 2.1-0)

model.matrix.rma: Model Matrix for 'rma' Objects

Description

The function extracts the model matrix for objects of class "rma".

Usage

# S3 method for rma
model.matrix(object, …)

Arguments

object

an object of class "rma".

other arguments.

Value

The model matrix.

References

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

See Also

fitted.rma

Examples

Run this code
# NOT RUN {
### meta-analysis of the log risk ratios using a mixed-effects meta-regression model
### with multiple moderators (absolute latitude, publication year, and allocation method)
res <- rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
           mods = ~ ablat + year + alloc, data=dat.bcg)
model.matrix(res)
# }

Run the code above in your browser using DataCamp Workspace