metafor (version 3.8-1)

fitted.rma: Fitted Values for 'rma' Objects

Description

The function computes the fitted values for objects of class "rma".

Usage

# S3 method for rma
fitted(object, ...)

Value

A vector with the fitted values.

Arguments

object

an object of class "rma".

...

other arguments.

References

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

See Also

predict.rma for a function to computed predicted values and blup.rma.uni for a function to compute BLUPs that combine the fitted values and predicted random effects.

Examples

Run this code
### 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)

### compute the fitted values
fitted(res)

Run the code above in your browser using DataLab