Learn R Programming

metafor (version 1.0-1)

weights.rma.uni: Weights for rma.uni Objects

Description

The function extracts the weights (in %) given to the observed effects or outcomes during the model fitting from objects of class "rma.uni".

Usage

## S3 method for class 'rma.uni':
weights(object, \dots)

Arguments

object
an object of class "rma.uni".
...
other arguments.

Value

  • A vector with the weights.

See Also

rma.uni, influence.rma.uni

Examples

Run this code
### load BCG vaccine data
data(dat.bcg)

### meta-analysis of the log relative risks using a mixed-effects model
### with two moderators (absolute latitude and publication year)
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, mods=cbind(ablat, year),
           data=dat.bcg, measure="RR", method="REML")
weights(res)

Run the code above in your browser using DataLab