Calculation of common and random effects estimates for meta-analyses with continuous outcome data; inverse variance weighting is used for pooling.

```
metacont(
n.e,
mean.e,
sd.e,
n.c,
mean.c,
sd.c,
studlab,
data = NULL,
subset = NULL,
exclude = NULL,
cluster = NULL,
median.e,
q1.e,
q3.e,
min.e,
max.e,
median.c,
q1.c,
q3.c,
min.c,
max.c,
method.mean = "Luo",
method.sd = "Shi",
approx.mean.e,
approx.mean.c = approx.mean.e,
approx.sd.e,
approx.sd.c = approx.sd.e,
sm = gs("smcont"),
method.ci = gs("method.ci.cont"),
level = gs("level"),
pooledvar = gs("pooledvar"),
method.smd = gs("method.smd"),
sd.glass = gs("sd.glass"),
exact.smd = gs("exact.smd"),
common = gs("common"),
random = gs("random") | !is.null(tau.preset),
overall = common | random,
overall.hetstat = common | random,
prediction = gs("prediction") | !missing(method.predict),
method.tau = gs("method.tau"),
method.tau.ci = gs("method.tau.ci"),
tau.preset = NULL,
TE.tau = NULL,
tau.common = gs("tau.common"),
level.ma = gs("level.ma"),
method.random.ci = gs("method.random.ci"),
adhoc.hakn.ci = gs("adhoc.hakn.ci"),
level.predict = gs("level.predict"),
method.predict = gs("method.predict"),
adhoc.hakn.pi = gs("adhoc.hakn.pi"),
seed.predict = NULL,
method.bias = gs("method.bias"),
backtransf = gs("backtransf"),
text.common = gs("text.common"),
text.random = gs("text.random"),
text.predict = gs("text.predict"),
text.w.common = gs("text.w.common"),
text.w.random = gs("text.w.random"),
title = gs("title"),
complab = gs("complab"),
outclab = "",
label.e = gs("label.e"),
label.c = gs("label.c"),
label.left = gs("label.left"),
label.right = gs("label.right"),
subgroup,
subgroup.name = NULL,
print.subgroup.name = gs("print.subgroup.name"),
sep.subgroup = gs("sep.subgroup"),
test.subgroup = gs("test.subgroup"),
prediction.subgroup = gs("prediction.subgroup"),
seed.predict.subgroup = NULL,
byvar,
id,
adhoc.hakn,
keepdata = gs("keepdata"),
warn = gs("warn"),
warn.deprecated = gs("warn.deprecated"),
control = NULL,
...
)
```

An object of class `c("metacont", "meta")`

with corresponding
generic functions (see `meta-object`

).

- n.e
Number of observations in experimental group.

- mean.e
Estimated mean in experimental group.

- sd.e
Standard deviation in experimental group.

- n.c
Number of observations in control group.

- mean.c
Estimated mean in control group.

- sd.c
Standard deviation in control group.

- studlab
An optional vector with study labels.

- data
An optional data frame containing the study information.

- subset
An optional vector specifying a subset of studies to be used.

- exclude
An optional vector specifying studies to exclude from meta-analysis, however, to include in printouts and forest plots.

- cluster
An optional vector specifying which estimates come from the same cluster resulting in the use of a three-level meta-analysis model.

- median.e
Median in experimental group (used to estimate the mean and standard deviation).

- q1.e
First quartile in experimental group (used to estimate the mean and standard deviation).

- q3.e
Third quartile in experimental group (used to estimate the mean and standard deviation).

- min.e
Minimum in experimental group (used to estimate the mean and standard deviation).

- max.e
Maximum in experimental group (used to estimate the mean and standard deviation).

- median.c
Median in control group (used to estimate the mean and standard deviation).

- q1.c
First quartile in control group (used to estimate the mean and standard deviation).

- q3.c
Third quartile in control group (used to estimate the mean and standard deviation).

- min.c
Minimum in control group (used to estimate the mean and standard deviation).

- max.c
Maximum in control group (used to estimate the mean and standard deviation).

- method.mean
A character string indicating which method to use to approximate the mean from the median and other statistics (see Details).

- method.sd
A character string indicating which method to use to approximate the standard deviation from sample size, median, interquartile range and range (see Details).

- approx.mean.e
Approximation method to estimate means in experimental group (see Details).

- approx.mean.c
Approximation method to estimate means in control group (see Details).

- approx.sd.e
Approximation method to estimate standard deviations in experimental group (see Details).

- approx.sd.c
Approximation method to estimate standard deviations in control group (see Details).

- sm
A character string indicating which summary measure (

`"MD"`

,`"SMD"`

, or`"ROM"`

) is to be used for pooling of studies.- method.ci
A character string indicating which method is used to calculate confidence intervals for individual studies (see Details).

- level
The level used to calculate confidence intervals for individual studies.

- pooledvar
A logical indicating if a pooled variance should be used for the mean difference (

`sm="MD"`

) or ratio of means (`sm="ROM"`

).- method.smd
A character string indicating which method is used to estimate the standardised mean difference (

`sm="SMD"`

). Either`"Hedges"`

for Hedges' g (default),`"Cohen"`

for Cohen's d, or`"Glass"`

for Glass' delta, can be abbreviated.- sd.glass
A character string indicating which standard deviation is used in the denominator for Glass' method to estimate the standardised mean difference. Either

`"control"`

using the standard deviation in the control group (`sd.c`

) or`"experimental"`

using the standard deviation in the experimental group (`sd.e`

), can be abbreviated.- exact.smd
A logical indicating whether exact formulae should be used in estimation of the standardised mean difference and its standard error (see Details).

- common
A logical indicating whether a common effect meta-analysis should be conducted.

- random
A logical indicating whether a random effects meta-analysis should be conducted.

- overall
A logical indicating whether overall summaries should be reported. This argument is useful in a meta-analysis with subgroups if overall results should not be reported.

- overall.hetstat
A logical value indicating whether to print heterogeneity measures for overall treatment comparisons. This argument is useful in a meta-analysis with subgroups if heterogeneity statistics should only be printed on subgroup level.

- prediction
A logical indicating whether a prediction interval should be printed.

- method.tau
A character string indicating which method is used to estimate the between-study variance \(\tau^2\) and its square root \(\tau\) (see

`meta-package`

).- method.tau.ci
A character string indicating which method is used to estimate the confidence interval of \(\tau^2\) and \(\tau\) (see

`meta-package`

).- tau.preset
Prespecified value for the square root of the between-study variance \(\tau^2\).

- TE.tau
Overall treatment effect used to estimate the between-study variance tau-squared.

- tau.common
A logical indicating whether tau-squared should be the same across subgroups.

- level.ma
The level used to calculate confidence intervals for meta-analysis estimates.

- method.random.ci
A character string indicating which method is used to calculate confidence interval and test statistic for random effects estimate (see

`meta-package`

).- adhoc.hakn.ci
A character string indicating whether an

*ad hoc*variance correction should be applied in the case of an arbitrarily small Hartung-Knapp variance estimate (see`meta-package`

).- level.predict
The level used to calculate prediction interval for a new study.

- method.predict
A character string indicating which method is used to calculate a prediction interval (see

`meta-package`

).- adhoc.hakn.pi
A character string indicating whether an

*ad hoc*variance correction should be applied for prediction interval (see`meta-package`

).- seed.predict
A numeric value used as seed to calculate bootstrap prediction interval (see

`meta-package`

).- method.bias
A character string indicating which test is to be used. Either

`"Begg"`

,`"Egger"`

,`"Thompson"`

, or`"Pustejovsky"`

(see`metabias`

), can be abbreviated.- backtransf
A logical indicating whether results for ratio of means (

`sm="ROM"`

) should be back transformed in printouts and plots. If TRUE (default), results will be presented as ratio of means; otherwise log ratio of means will be shown.- text.common
A character string used in printouts and forest plot to label the pooled common effect estimate.

- text.random
A character string used in printouts and forest plot to label the pooled random effects estimate.

- text.predict
A character string used in printouts and forest plot to label the prediction interval.

- text.w.common
A character string used to label weights of common effect model.

- text.w.random
A character string used to label weights of random effects model.

- title
Title of meta-analysis / systematic review.

- complab
Comparison label.

- outclab
Outcome label.

- label.e
Label for experimental group.

- label.c
Label for control group.

- label.left
Graph label on left side of forest plot.

- label.right
Graph label on right side of forest plot.

- subgroup
An optional vector to conduct a meta-analysis with subgroups.

- subgroup.name
A character string with a name for the subgroup variable.

- print.subgroup.name
A logical indicating whether the name of the subgroup variable should be printed in front of the group labels.

- sep.subgroup
A character string defining the separator between name of subgroup variable and subgroup label.

- test.subgroup
A logical value indicating whether to print results of test for subgroup differences.

- prediction.subgroup
A logical indicating whether prediction intervals should be printed for subgroups.

- seed.predict.subgroup
A numeric vector providing seeds to calculate bootstrap prediction intervals within subgroups. Must be of same length as the number of subgroups.

- byvar
Deprecated argument (replaced by 'subgroup').

- id
Deprecated argument (replaced by 'cluster').

- adhoc.hakn
Deprecated argument (replaced by 'adhoc.hakn.ci').

- keepdata
A logical indicating whether original data (set) should be kept in meta object.

- warn
A logical indicating whether warnings should be printed (e.g., if studies are excluded from meta-analysis due to zero standard deviations).

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

- control
An optional list to control the iterative process to estimate the between-study variance \(\tau^2\). This argument is passed on to

`rma.uni`

.- ...
Additional arguments (to catch deprecated arguments).

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

Calculation of common and random effects estimates for meta-analyses with continuous outcome data; inverse variance weighting is used for pooling.

A three-level random effects meta-analysis model (Van den Noortgate
et al., 2013) is utilized if argument `cluster`

is used and at
least one cluster provides more than one estimate. Internally,
`rma.mv`

is called to conduct the analysis and
`weights.rma.mv`

with argument ```
type =
"rowsum"
```

is used to calculate random effects weights.

Default settings are utilised for several arguments (assignments
using `gs`

function). These defaults can be changed for
the current R session using the `settings.meta`

function.

Furthermore, R function `update.meta`

can be used to
rerun a meta-analysis with different settings.

Three different types of summary measures are available for continuous outcomes:

mean difference (argument

`sm = "MD"`

)standardised mean difference (

`sm = "SMD"`

)ratio of means (

`sm = "ROM"`

)

For the standardised mean difference three methods are implemented:

Hedges' g (default,

`method.smd = "Hedges"`

) - see Hedges (1981)Cohen's d (

`method.smd = "Cohen"`

) - see Cohen (1988)Glass' delta (

`method.smd = "Glass"`

) - see Glass (1976)

Hedges (1981) calculated the exact bias in Cohen's d which is a
ratio of gamma distributions with the degrees of freedom,
i.e. total sample size minus two, as argument. By default (argument
`exact.smd = FALSE`

), an accurate approximation of this bias
provided in Hedges (1981) is utilised for Hedges' g as well as its
standard error; these approximations are also used in RevMan
5. Following Borenstein et al. (2009) these approximations are not
used in the estimation of Cohen's d. White and Thomas (2005) argued
that approximations are unnecessary with modern software and
accordingly promote to use the exact formulae; this is possible
using argument `exact.smd = TRUE`

. For Hedges' g the exact
formulae are used to calculate the standardised mean difference as
well as the standard error; for Cohen's d the exact formula is only
used to calculate the standard error. In typical applications (with
sample sizes above 10), the differences between using the exact
formulae and the approximation will be minimal.

For Glass' delta, by default (argument ```
sd.glass =
"control"
```

), the standard deviation in the control group
(`sd.c`

) is used in the denominator of the standard mean
difference. The standard deviation in the experimental group
(`sd.e`

) can be used by specifying ```
sd.glass =
"experimental"
```

.

Meta-analysis of ratio of means -- also called response ratios --
is described in Hedges et al. (1999) and Friedrich et al. (2008).
Calculations are conducted on the log scale and list elements
`TE`

, `TE.common`

, and `TE.random`

contain the
logarithm of the ratio of means. In printouts and plots these
values are back transformed if argument `backtransf = TRUE`

.

Missing means in the experimental group (analogously for the control group) can be derived from

sample size, median, interquartile range and range (arguments

`n.e`

,`median.e`

,`q1.e`

,`q3.e`

,`min.e`

, and`max.e`

),sample size, median and interquartile range (arguments

`n.e`

,`median.e`

,`q1.e`

, and`q3.e`

), orsample size, median and range (arguments

`n.e`

,`median.e`

,`min.e`

, and`max.e`

).

By default, methods described in Luo et al. (2018) are utilized
(argument `method.mean = "Luo"`

):

equation (15) if sample size, median, interquartile range and range are available,

equation (11) if sample size, median and interquartile range are available,

equation (7) if sample size, median and range are available.

Instead the methods described in Wan et al. (2014) are used if
argument `method.mean = "Wan"`

:

equation (10) if sample size, median, interquartile range and range are available,

equation (14) if sample size, median and interquartile range are available,

equation (2) if sample size, median and range are available.

The following methods are also available to estimate means from
quantiles or ranges if R package **estmeansd** is installed:

Method for Unknown Non-Normal Distributions (MLN) approach (Cai et al. (2021), argument

`method.mean = "Cai"`

),Quantile Estimation (QE) method (McGrath et al. (2020), argument

`method.mean = "QE-McGrath"`

)),Box-Cox (BC) method (McGrath et al. (2020), argument

`method.mean = "BC-McGrath"`

)).

By default, missing means are replaced successively using
interquartile ranges and ranges (if available), interquartile
ranges (if available) and finally ranges. Arguments
`approx.mean.e`

and `approx.mean.c`

can be used to
overwrite this behaviour for each individual study and treatment
arm:

use means directly (entry

`""`

in argument`approx.mean.e`

or`approx.mean.c`

);median, interquartile range and range (

`"iqr.range"`

);median and interquartile range (

`"iqr"`

);median and range (

`"range"`

).

Missing standard deviations in the experimental group (analogously for the control group) can be derived from

sample size, median, interquartile range and range (arguments

`n.e`

,`median.e`

,`q1.e`

,`q3.e`

,`min.e`

, and`max.e`

),sample size, median and interquartile range (arguments

`n.e`

,`median.e`

,`q1.e`

and`q3.e`

), orsample size, median and range (arguments

`n.e`

,`median.e`

,`min.e`

and`max.e`

).

Wan et al. (2014) describe methods to estimate the standard
deviation from the sample size, median and additional
statistics. Shi et al. (2020) provide an improved estimate of the
standard deviation if the interquartile range and range are
available in addition to the sample size and median. Accordingly,
equation (11) in Shi et al. (2020) is the default (argument
`method.sd = "Shi"`

), if the median, interquartile range and
range are provided. The method by Wan et al. (2014) is used if
argument `method.sd = "Wan"`

and, depending on the sample
size, either equation (12) or (13) is used. If only the
interquartile range or range is available, equations (15) / (16)
and (7) / (9) in Wan et al. (2014) are used, respectively.

The following methods are also available to estimate standard
deviations from quantiles or ranges if R package **estmeansd**
is installed:

Method for Unknown Non-Normal Distributions (MLN) approach (Cai et al. (2021), argument

`method.mean = "Cai"`

),Quantile Estimation (QE) method (McGrath et al. (2020), argument

`method.mean = "QE-McGrath"`

)),Box-Cox (BC) method (McGrath et al. (2020), argument

`method.mean = "BC-McGrath"`

)).

By default, missing standard deviations are replaced successively
using these method, i.e., interquartile ranges and ranges are used
before interquartile ranges before ranges. Arguments
`approx.sd.e`

and `approx.sd.c`

can be used to overwrite
this default for each individual study and treatment arms:

sample size, median, interquartile range and range (

`"iqr.range"`

);sample size, median and interquartile range (

`"iqr"`

);sample size, median and range (

`"range"`

).

For the mean difference (argument `sm = "MD"`

), the confidence
interval for individual studies can be based on the

standard normal distribution (

`method.ci = "z"`

, default), ort-distribution (

`method.ci = "t"`

).

Note, this choice does not affect the results of the common effect and random effects meta-analysis.

Argument `subgroup`

can be used to conduct subgroup analysis for
a categorical covariate. The `metareg`

function can be
used instead for more than one categorical covariate or continuous
covariates.

Arguments `subset`

and `exclude`

can be used to exclude
studies from the meta-analysis. Studies are removed completely from
the meta-analysis using argument `subset`

, while excluded
studies are shown in printouts and forest plots using argument
`exclude`

(see Examples in `metagen`

).
Meta-analysis results are the same for both arguments.

Internally, both common effect and random effects models are
calculated regardless of values choosen for arguments `common`

and `random`

. Accordingly, the estimate for the random effects
model can be extracted from component `TE.random`

of an object
of class `"meta"`

even if argument ```
random =
FALSE
```

. However, all functions in R package **meta** will
adequately consider the values for `common`

and
`random`

. E.g. function `print.meta`

will not
print results for the random effects model if ```
random =
FALSE
```

.

A prediction interval will only be shown if ```
prediction =
TRUE
```

.

Borenstein M, Hedges LV, Higgins JPT, Rothstein HR (2009):
*Introduction to Meta-Analysis*.
Chichester: Wiley

Cai S, Zhou J, Pan J (2021):
Estimating the sample mean and standard deviation from order
statistics and sample size in meta-analysis.
*Statistical Methods in Medical Research*,
**30**, 2701--2719

Cohen J (1988):
*Statistical Power Analysis for the Behavioral Sciences
(second ed.)*.
Lawrence Erlbaum Associates

Friedrich JO, Adhikari NK, Beyene J (2008):
The ratio of means method as an alternative to mean differences for
analyzing continuous outcome variables in meta-analysis: A
simulation study.
*BMC Medical Research Methodology*,
**8**, 32

Glass G (1976):
Primary, secondary, and meta-analysis of research.
*Educational Researcher*,
**5**, 3--8

Hedges LV (1981):
Distribution theory for Glass's estimator of effect size and
related estimators.
*Journal of Educational and Behavioral Statistics*,
**6**, 107--28

Hedges LV, Gurevitch J, Curtis PS (1999):
The meta-analysis of response ratios in experimental ecology.
*Ecology*,
**80**, 1150--6

Luo D, Wan X, Liu J, Tong T (2018):
Optimally estimating the sample mean from the sample size, median,
mid-range, and/or mid-quartile range.
*Statistical Methods in Medical Research*,
**27**, 1785--805

McGrath S, Zhao X, Steele R, et al. and the DEPRESsion Screening
Data (DEPRESSD) Collaboration (2020):
Estimating the sample mean and standard deviation from commonly
reported quantiles in meta-analysis.
*Statistical Methods in Medical Research*,
**29**, 2520--2537

*Review Manager (RevMan)* [Computer program]. Version 5.4.
The Cochrane Collaboration, 2020

Shi J, Luo D, Weng H, Zeng XT, Lin L, Chu H, Tong T (2020):
Optimally estimating the sample standard deviation from the
five-number summary.
*Research Synthesis Methods*,
**11**, 641--54

Van den Noortgate W, López-López JA, Marín-Martínez F, Sánchez-Meca J (2013):
Three-level meta-analysis of dependent effect sizes.
*Behavior Research Methods*,
**45**, 576--94

Wan X, Wang W, Liu J, Tong T (2014):
Estimating the sample mean and standard deviation from the sample
size, median, range and/or interquartile range.
*BMC Medical Research Methodology*,
**14**, 135

White IR, Thomas J (2005):
Standardized mean differences in individually-randomized and
cluster-randomized trials, with applications to meta-analysis.
*Clinical Trials*,
**2**, 141--51

`meta-package`

, `update.meta`

,
`metabin`

, `metagen`

```
data(Fleiss1993cont)
# Meta-analysis with Hedges' g as effect measure
#
m1 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
data = Fleiss1993cont, sm = "SMD")
m1
forest(m1)
# Use Cohen's d instead of Hedges' g as effect measure
#
update(m1, method.smd = "Cohen")
# Use Glass' delta instead of Hedges' g as effect measure
#
update(m1, method.smd = "Glass")
# Use Glass' delta based on the standard deviation in the experimental group
#
update(m1, method.smd = "Glass", sd.glass = "experimental")
# Calculate Hedges' g based on exact formulae
#
update(m1, exact.smd = TRUE)
data(amlodipine)
m2 <- metacont(n.amlo, mean.amlo, sqrt(var.amlo),
n.plac, mean.plac, sqrt(var.plac),
data = amlodipine, studlab = study)
m2
# Use pooled variance
#
update(m2, pooledvar = TRUE)
# Meta-analysis of response ratios (Hedges et al., 1999)
#
data(woodyplants)
m3 <- metacont(n.elev, mean.elev, sd.elev, n.amb, mean.amb, sd.amb,
data = woodyplants, sm = "ROM")
m3
print(m3, backtransf = FALSE)
```

Run the code above in your browser using DataLab