The function computes the weights given to the observed effects or outcomes during the model fitting for objects of class "rma.uni", "rma.mh", "rma.peto", and "rma.mv".

# S3 method for rma.uni
weights(object, type="diagonal", …)
# S3 method for rma.mh
weights(object, type="diagonal", …)
# S3 method for rma.peto
weights(object, type="diagonal", …)
# S3 method for rma.glmm
weights(object, …)
# S3 method for rma.mv
weights(object, type="diagonal", …)

## Arguments

object an object of class "rma.uni", "rma.mh", "rma.peto", or "rma.mv". The method is not yet implemented for objects of class "rma.glmm". character string indicating whether to return only the diagonal of the weight matrix ("diagonal") or the entire weight matrix ("matrix"). other arguments.

## Value

Either a vector with the diagonal elements of the weight matrix or the entire weight matrix. When only the diagonal elements are returned, they are given in % (and they add up to 100\% \times). When the entire weight matrix is requested, this is always a diagonal matrix for objects of class "rma.uni", "rma.mh", "rma.peto".

## 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/.

rma.uni, rma.mh, rma.peto, rma.mv, influence.rma.uni
### meta-analysis of the log risk ratios using a mixed-effects model
#>  8.784824  7.991920 11.923841  2.283581  8.062988