weights.meta: Calculate absolute and percentage weights for meta-analysis

View source: R/weights.meta.R

weights.metaR Documentation

Calculate absolute and percentage weights for meta-analysis

Description

This function returns a data frame containing information on absolute and percentage weights of individual studies contributing to common effect and random effects meta-analysis.

Usage

## S3 method for class 'meta'
weights(
  object,
  common = object$common,
  random = object$random,
  warn.deprecated = gs("warn.deprecated"),
  ...
)

Arguments

object

An object of class meta.

common

A logical indicating whether absolute and percentage weights from the common effect model should be calculated.

random

A logical indicating whether absolute and percentage weights from the random effects model should be calculated.

warn.deprecated

A logical indicating whether warnings should be printed if deprecated arguments are used.

...

Additional arguments (to catch deprecated arguments).

Value

A data frame with the following variables is returned:

Variable Definition Condition
w.common absolute weights in common effect model (if common = TRUE)
p.common percentage weights in common effect model (if common = TRUE)
w.random absolute weights in random effects model (if random = TRUE)
p.random percentage weights in random effects model (if random = TRUE)

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

See Also

metabin, metacont, metagen

Examples

data(Fleiss1993cont)
# Do meta-analysis (common effect and random effects model)
#
meta1 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
  data = Fleiss1993cont, studlab = paste(study, year), sm = "SMD")

# Print weights for common effect and random effects meta-analysis
#
weights(meta1)

# Do meta-analysis (only random effects model)
#
meta2 <- update(meta1, common = FALSE)

# Print weights for random effects meta-analysis
#
weights(meta2)

# Print weights for common effect and random effects meta-analysis
#
weights(meta2, common = TRUE)


meta documentation built on Oct. 31, 2024, 5:07 p.m.