meta (version 4.9-6)

settings.meta: Print and change default settings to conduct and print or plot meta-analyses in R package meta.

Description

Print and change default settings to conduct and print or plot meta-analyses in R package meta. The following general settings are available: Review Manager 5, Journal of the American Medical Association.

Usage

settings.meta(...)

Arguments

...

Arguments to change default settings.

Details

This function can be used to define defaults for several arguments (i.e., assignments using gs) of the following R functions: metabin, metacont, metacor, metacr, metagen, metainc, metaprop, metarate

Furthermore, some of these settings are considered to print meta-analysis results using print.meta and print.summary.meta, and to produce forest plots using forest.meta.

The function can be used to either change individual settings (see Examples) or use one of the following general settings:

  • settings.meta("revman5")

  • settings.meta("jama")

The first command can be used to reproduce meta-analyses from Cochrane reviews conducted with Review Manager 5 (RevMan 5, http://community.cochrane.org/tools/review-production-tools/revman-5) and specifies to use a RevMan 5 layout in forest plots. The second command can be used to generate forest plots following instructions for authors of the Journal of the American Medical Association (http://jamanetwork.com/journals/jama/pages/instructions-for-authors).

RevMan 5 settings, in detail:

Argument Value Comment
hakn FALSE method not available in RevMan 5
method.tau "DL" only available method in RevMan 5
tau.common FALSE common between-study variance in subgroups
MH.exact FALSE exact Mantel-Haenszel method
RR.cochrane TRUE calculation of risk ratios
layout "RevMan5" layout for forest plots
test.overall TRUE print information on test of overall effect
digits.I2 0 number of digits for I-squared measure
digits.tau2 0 number of digits for tau-squared
CIbracket, "["

JAMA settings:

Argument Value Comment
layout "JAMA" layout for forest plots
test.overall TRUE print information on test of overall effect
digits.I2 0 number of digits for I-squared measure
CIbracket, "("

A list of all arguments with current settings is printed using the command settings.meta("print").

In order to reset all settings of R package meta the command settings.meta("reset") can be used.

See Also

gs, forest.meta

Examples

Run this code
# NOT RUN {
# Get listing of current settings
#
settings.meta("print")

# Meta-analyses using default settings
#
metabin(10, 20, 15, 20)
metaprop(4, 20)
metabin(10, 20, 15, 20, sm = "RD")
metaprop(4, 20, sm = "PLN")

# Change summary measure for R functions metabin and metaprop
# and store old settings
#
oldset <- settings.meta(smbin = "RD", smprop = "PLN")
#
metabin(10, 20, 15, 20)
metaprop(4, 20)

# Use old settings
#
settings.meta(oldset)

# Change level used to calculate confidence intervals
# (99%-CI for studies, 99.9%-CI for pooled effects)
#
metagen(1:3, 2:4 / 10, sm = "MD")
settings.meta(level = 0.99, level.comb = 0.999)
metagen(1:3, 2:4 / 10, sm = "MD")

# Always print a prediction interval
#
settings.meta(prediction = TRUE)
metagen(1:3, 2:4 / 10, sm = "MD")
metagen(4:6, 4:2 / 10, sm = "MD")

# Try to set unknown argument results in a warning
#
try(settings.meta(unknownarg = TRUE))

# Reset to default settings of R package meta
#
settings.meta("reset")
metabin(10, 20, 15, 20)
metaprop(4, 20)
metagen(1:3, 2:4 / 10, sm = "MD")

# Do not back transform results (e.g. print log odds ratios instead
# of odds ratios, print transformed correlations / proportions
# instead of correlations / proportions)
#
settings.meta(backtransf = FALSE)
metabin(10, 20, 15, 20)
metaprop(4, 20)
metacor(c(0.85, 0.7, 0.95), c(20, 40, 10))

# Forest plot using RevMan 5 style
#
settings.meta("revman5")
forest(metagen(1:3, 2:4 / 10, sm = "MD", comb.fixed = FALSE),
       label.left = "Favours A", label.right = "Favours B",
       colgap.studlab = "2cm",
       colgap.forest.left = "0.2cm")

# Forest plot using JAMA style
#
settings.meta("jama")
forest(metagen(1:3, 2:4 / 10, sm = "MD", comb.fixed = FALSE),
       label.left = "Favours A", label.right = "Favours B",
       colgap.studlab = "2cm",
       colgap.forest.left = "0.2cm")

# Use slightly different layout for confidence intervals
# (especially useful if upper confidence limit can be negative)
#
settings.meta(CIseparator = " - ")
forest(metagen(-(1:3), 2:4 / 10, sm="MD", comb.fixed=FALSE),
       label.left="Favours A", label.right="Favours B",
       colgap.studlab = "2cm",
       colgap.forest.left = "0.2cm")

# Use old settings
#
settings.meta(oldset)

# }

Run the code above in your browser using DataCamp Workspace