metaadd: Add pooled results from external analysis to meta-analysis

View source: R/metaadd.R

metaaddR Documentation

Add pooled results from external analysis to meta-analysis

Description

Add pooled results from external analysis to an existing meta-analysis object. This is useful, for example, to add results from a Bayesian meta-analysis which is not implemented in R package meta.

Usage

metaadd(
  x,
  type = NULL,
  TE = NA,
  lower = NA,
  upper = NA,
  statistic = NA,
  pval = NA,
  df = NA,
  se = NA,
  method = "",
  method.ci = "",
  text = "Added result",
  data = NULL,
  transf = gs("transf")
)

Arguments

x

Meta-analysis object.

type

A character string or vector indicating whether added results are from common effect, random effects model or prediction interval. Either "common", "random", "prediction", or "tau2" can be abbreviated.

TE

Pooled estimate(s) or between-study variance.

lower

Lower limit(s) of confidence or prediction interval.

upper

Upper limit(s) of confidence or prediction interval.

statistic

Test statistic(s).

pval

P-value(s).

df

Degrees of freedom for confidence or prediction intervals.s

se

Standard error(s).

method

A character string or vector to describe the method used to get the pooled estimate(s), prediction interval(s) or between-study variance(s).

method.ci

A character string or vector to describe the method used to get the confidence or prediction interval.

text

A character string or vector used in printouts and forest plot to label the added results.

data

An optional data frame containing the new results or an object of class meta.

transf

A logical indicating whether inputs for arguments TE, lower and upper are already appropriately transformed to conduct the meta-analysis or on the original scale. If transf = TRUE (default), inputs are expected to be log odds ratios instead of odds ratios for sm = "OR" and Fisher's z transformed correlations instead of correlations for sm = "ZCOR", for example.

Details

In R package meta, objects of class "meta" contain results of both common effect and random effects meta-analyses. This function enables the user to add the pooled results of an additional analysis to an existing meta-analysis object. This is useful, for example, to add the result of a Bayesian meta-analysis.

If argument data is a meta-analysis object created with R package meta, arguments TE, lower, upper, statistic and pval are ignored as this information is extracted from the meta-analysis.

Otherwise, arguments TE, lower and upper have to be provided if type = "common" or type = "random". For type = "prediction", only arguments lower and upper are mandatory.

Note, R function metamerge can be used to add meta-analysis results of another meta-analysis object (see meta-object).

Value

An object of class "meta" with corresponding generic functions (see meta-object).

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

See Also

metagen, metamerge

Examples

data(Fleiss1993bin)

# Common effect and random effects meta-analysis
m1 <- metabin(d.asp, n.asp, d.plac, n.plac, data = Fleiss1993bin,
  studlab = paste(study, year), sm = "OR")

# Naive pooling
m2 <- metabin(sum(d.asp), sum(n.asp), sum(d.plac), sum(n.plac),
  data = Fleiss1993bin, sm = "OR", text.common = "Naive pooling")

# Add results of second meta-analysis from common effect model
m12 <- metaadd(m1, data = m2)
m12

forest(m12)


guido-s/meta documentation built on June 12, 2025, 11:48 p.m.