runMetaAnalysis: Run different types of meta-analyses

View source: R/runMetaAnalysis.R

runMetaAnalysisR Documentation

Run different types of meta-analyses

Description

This wrapper function allows to simultaneously pool effect sizes using different meta-analytic approaches.

Usage

runMetaAnalysis(data,
                which.run = c("overall", "combined",
                              "lowest.highest", "outliers",
                              "influence", "rob", "threelevel",
                              "threelevel.che"),
                method.tau = "REML",
                hakn = TRUE,
                study.var = "study",
                extra.grouping.var = NULL,
                arm.var.1 = "Cond_spec_trt1",
                arm.var.2 = "Cond_spec_trt2",
                measure.var = "Outc_measure",
                es.var = "es",
                se.var = "se",
                low.rob.filter = "rob > 2",
                method.tau.ci = "Q-Profile",
                round.digits = 2,
                which.outliers = c("general", "combined"),
                which.influence = c("general", "combined"),
                which.rob = c("general", "combined"),
                nnt.cer = 0.2,
                rho.within.study = 0.5,
                use.rve = TRUE,
                html = TRUE,
                ...)

Arguments

data

data.frame. Effect size data in the wide format, as created by calculateEffectSizes.

which.run

character. Selection of models to be calculated. See 'Details'.

method.tau

character. A character string indicating which method is used to estimate the between-study variance (tau-squared) and its square root (tau). Either "REML" (default), "DL", "PM", "ML", "HS", "SJ", "HE", or "EB", can be abbreviated (see metagen). Use "FE" to use a fixed-effect/"common effect" model.

hakn

logical. Should the Knapp-Hartung adjustment for effect size significance tests be used? Default is TRUE.

study.var

character. The name of the variable in data in which the study IDs are stored.

extra.grouping.var

character. Additional grouping variable within studies to be used for the "combined" analysis. This is useful, for example, to not pool the effects of different treatment arms within multi-arm trials. NULL by default.

arm.var.1

character. The name of the variable in data in which the condition (e.g. "guided iCBT") of the first arm within a comparison are stored.

arm.var.2

character. The name of the variable in data in which the condition (e.g. "wlc") of the second arm within a comparison are stored.

measure.var

character. The name of the variable in data in which the instrument used for the comparison is stored.

es.var

character. The name of the variable in data in which the calculated effect sizes (i.e. Hedges' g) are stored.

se.var

character. The name of the variable in data in which the standard error of the calculated effect sizes (i.e. Hedges' g) are stored.

low.rob.filter

character. A filtering statement by which to include studies for the "low RoB only" analysis. Please note that the name of the variable must be included as a column in data.

method.tau.ci

character. A character string indicating which method is used to estimate the confidence interval of tau/tau-squared. Either "Q-Profile" (default and recommended), "BJ", "J", or "PL" can be abbreviated. See metagen for details.

round.digits

numeric. Number of digits to round the (presented) results by. Default is 2.

which.outliers

character. Which model should be used to conduct outlier analyses? Must be "general" or "combined", with "general" being the default.

which.influence

character. Which model should be used to conduct influence analyses? Must be "general" or "combined", with "general" being the default.

which.rob

character. Which model should be used to conduct the "low risk of bias only" analyses? Must be "general" or "combined", with "general" being the default.

nnt.cer

numeric. Value between 0 and 1, indicating the assumed control group event rate to be used for calculating NNTs via the Furukawa-Leucht method.

rho.within.study

numeric. Value between 0 and 1, indicating the assumed correlation of effect sizes within studies. This is relevant to combine effect sizes for the "combined" analysis type, and used to estimate the variance-covariance matrices needed for the conditional and hierarchical effects three-level model. Default is 0.5.

use.rve

logical. Should robust variance estimation be used to calculate confidence intervals and tests of three-level models? TRUE by default.

html

logical. Should an HTML table be created for the results? Default is TRUE.

...

Additional arguments.

Details

The runMetaAnalysis function is a wrapper for several types of meta-analytic models that are typically used. It allows to run all of these models in one step in order to generate results that are somewhat closer to being "publication-ready".

By default, the following models are calculated:

  • "overall". Runs a generic inverse-variance (random-effects) model. All included effect sizes are treated as independent.

  • "combined". Pools all effect sizes within one study (defined by study.var) before pooling. This ensures that all effect sizes are independent (i.e., unit-of-analysis error & double-counting is avoided). To combine the effects, one has to assume a correlation of effect sizes within studies, empirical estimates of which are typically not available.

  • "lowest.highest". Runs a meta-analysis, but with only (i) the lowest and (ii) highest effect size within each study included.

  • "outlier". Runs a meta-analysis without statistical outliers (i.e. effect sizes for which the confidence interval does not overlap with the confidence intervall of the overall effect).

  • "influence". Runs a meta-analysis without influential cases (see influence.rma.uni for details).

  • "rob". Runs a meta-analysis with only low-RoB studies included.

  • "threelevel". Runs a multilevel (three-level) meta-analysis model, with effect sizes nested in studies.

  • "threelevel.che". Runs a multilevel (three-level) meta-analysis model, with effect sizes nested in studies. Variance-covariance matrices of each study with two or more effect sizes are estimated using rho.within.study as the assumed overall within-study correlation. This imputation allows to run a "correlated and hierarchical effects" (CHE) model, which is typically a good approximation for data sets with unknown and/or complex dependence structures.

For more details see the help vignette: vignette("metapsyTools").

Value

Returns an object of class "runMetaAnalysis". This object includes, among other things, a data.frame with the name summary, in which all results are summarized - including the studies which were removed for some analysis steps. Other objects are the "raw" model objects returned by all selected analysis types. This allows to conduct further operations on some models specifically (e.g. run a meta-regression by plugging one of the model objects in update.meta.

Author(s)

Mathias Harrer mathias.h.harrer@gmail.com, Paula Kuper paula.r.kuper@gmail.com, Pim Cuijpers p.cuijpers@vu.nl

See Also

calculateEffectSizes

Examples

## Not run: 
data("inpatients")
library(meta)

inpatients %>%
   checkDataFormat() %>%
     checkConflicts() %>%
     expandMultiarmTrials() %>%
     calculateEffectSizes() -> data

# Run the meta-analyses
runMetaAnalysis(data) -> res

# Show summary
res

# Show forest plot (by default, "general" is used)
plot(res)

# Show forest plot of specific analysis
plot(res, "outliers")
plot(res, "threelevel")
plot(res, "baujat")
plot(res, "influence")
plot(res, "lowest.highest")

# Extract specific model and do further calculations
# (e.g. meta-regression on 'year')
metareg(res$model.overall, ~year)

# For the combined analysis, use provide an extra variable
# so that different treatment arm comparisons in multiarm trials are NOT pooled
data("psyCtrSubsetWide")
psyCtrSubsetWide %>%
  checkDataFormat() %>%
  checkConflicts() %>%
  expandMultiarmTrials() %>%
  calculateEffectSizes() %>%
  filterPoolingData(year > 2010) %>%
  runMetaAnalysis(extra.grouping.var = "Cond_spec_trt1")

## End(Not run)


MathiasHarrer/metapsyTools documentation built on May 1, 2022, 5:14 p.m.