netmeta  R Documentation 
Network metaanalysis is a generalisation of pairwise metaanalysis that compares all pairs of treatments within a number of treatments for the same condition. The graphtheoretical approach for network metaanalysis uses methods that were originally developed in electrical network theory. It has been found to be equivalent to the frequentist approach to network metaanalysis which is based on weighted least squares regression (Rücker, 2012).
Print method for objects of class netmeta
.
netmeta(
TE,
seTE,
treat1,
treat2,
studlab,
data = NULL,
subset = NULL,
sm,
level = gs("level"),
level.ma = gs("level.ma"),
common = gs("common"),
random = gs("random")  !is.null(tau.preset),
prediction = FALSE,
level.predict = gs("level.predict"),
reference.group,
baseline.reference = TRUE,
small.values = "desirable",
all.treatments = NULL,
seq = NULL,
method.tau = "DL",
tau.preset = NULL,
tol.multiarm = 0.001,
tol.multiarm.se = NULL,
details.chkmultiarm = FALSE,
sep.trts = ":",
nchar.trts = 666,
nchar.studlab = 666,
func.inverse = invmat,
n1 = NULL,
n2 = NULL,
event1 = NULL,
event2 = NULL,
incr = NULL,
sd1 = NULL,
sd2 = NULL,
time1 = NULL,
time2 = NULL,
backtransf = gs("backtransf"),
title = "",
keepdata = gs("keepdata"),
control = NULL,
warn = TRUE,
warn.deprecated = gs("warn.deprecated"),
nchar = nchar.trts,
...
)
## S3 method for class 'netmeta'
print(
x,
common = x$common,
random = x$random,
prediction = x$prediction,
reference.group = x$reference.group,
baseline.reference = x$baseline.reference,
all.treatments = x$all.treatments,
backtransf = x$backtransf,
nchar.trts = x$nchar.trts,
header = TRUE,
digits = gs("digits"),
digits.stat = gs("digits.stat"),
digits.pval = max(gs("digits.pval"), 2),
digits.pval.Q = max(gs("digits.pval.Q"), 2),
digits.Q = gs("digits.Q"),
digits.tau2 = gs("digits.tau2"),
digits.tau = gs("digits.tau"),
digits.I2 = gs("digits.I2"),
scientific.pval = gs("scientific.pval"),
big.mark = gs("big.mark"),
text.tau2 = gs("text.tau2"),
text.tau = gs("text.tau"),
text.I2 = gs("text.I2"),
legend = TRUE,
warn.deprecated = gs("warn.deprecated"),
...
)
TE 
Estimate of treatment effect, i.e. difference between
first and second treatment (e.g. log odds ratio, mean difference,
or log hazard ratio). Or an R object created with

seTE 
Standard error of treatment estimate. 
treat1 
Label/Number for first treatment. 
treat2 
Label/Number for second treatment. 
studlab 
An optional  but important!  vector with study labels (see Details). 
data 
An optional data frame containing the study information. 
subset 
An optional vector specifying a subset of studies to be used. 
sm 
A character string indicating underlying summary measure,
e.g., 
level 
The level used to calculate confidence intervals for individual comparisons. 
level.ma 
The level used to calculate confidence intervals for network estimates. 
common 
A logical indicating whether results for the common effects model should be printed. 
random 
A logical indicating whether results for the random effects model should be printed. 
prediction 
A logical indicating whether prediction intervals should be printed. 
level.predict 
The level used to calculate prediction intervals for a new study. 
reference.group 
Reference treatment. 
baseline.reference 
A logical indicating whether results
should be expressed as comparisons of other treatments versus the
reference treatment (default) or vice versa. This argument is
only considered if 
small.values 
A character string specifying whether small
treatment effects indicate a beneficial ( 
all.treatments 
A logical or 
seq 
A character or numerical vector specifying the sequence of treatments in printouts. 
method.tau 
A character string indicating which method is
used to estimate the betweenstudy variance 
tau.preset 
An optional value for manually setting the
squareroot of the betweenstudy variance 
tol.multiarm 
A numeric for the tolerance for consistency of treatment estimates in multiarm studies which are consistent by design. 
tol.multiarm.se 
A numeric for the tolerance for consistency
of standard errors in multiarm studies which are consistent by
design. This check is not conducted if the argument is

details.chkmultiarm 
A logical indicating whether treatment estimates and / or variances of multiarm studies with inconsistent results or negative multiarm variances should be printed. 
sep.trts 
A character used in comparison names as separator between treatment labels. 
nchar.trts 
A numeric defining the minimum number of characters used to create unique treatment names. 
nchar.studlab 
A numeric defining the minimum number of characters used to create unique study labels. 
func.inverse 
R function used to calculate the pseudoinverse of the Laplacian matrix L (see Details). 
n1 
Number of observations in first treatment group. 
n2 
Number of observations in second treatment group. 
event1 
Number of events in first treatment group. 
event2 
Number of events in second treatment group. 
incr 
Numerical value added to cell frequencies (for details,
see 
sd1 
Standard deviation in first treatment group. 
sd2 
Standard deviation in second treatment group. 
time1 
Person time at risk in first treatment group. 
time2 
Person time at risk in second treatment group. 
backtransf 
A logical indicating whether results should be
back transformed in printouts and forest plots. If

title 
Title of metaanalysis / systematic review. 
keepdata 
A logical indicating whether original data (set) should be kept in netmeta object. 
control 
An optional list to control the iterative process to
estimate the betweenstudy variance 
warn 
A logical indicating whether warnings should be printed (e.g., if studies are excluded from metaanalysis due to zero standard errors). 
warn.deprecated 
A logical indicating whether warnings should be printed if deprecated arguments are used. 
nchar 
Deprecated argument (replaced by 
... 
Additional arguments. 
x 
An object of class 
header 
A logical indicating whether information on title of metaanalysis, comparison and outcome should be printed at the beginning of the printout. 
digits 
Minimal number of significant digits, see

digits.stat 
Minimal number of significant digits for tests
of overall effect, see 
digits.pval 
Minimal number of significant digits for pvalue
of overall effects, see 
digits.pval.Q 
Minimal number of significant digits for
pvalue of heterogeneity tests, see 
digits.Q 
Minimal number of significant digits for
heterogeneity statistics, see 
digits.tau2 
Minimal number of significant digits for
betweenstudy variance, see 
digits.tau 
Minimal number of significant digits for square
root of betweenstudy variance, see 
digits.I2 
Minimal number of significant digits for Isquared
statistic, see 
scientific.pval 
A logical specifying whether pvalues should be printed in scientific notation, e.g., 1.2345e01 instead of 0.12345. 
big.mark 
A character used as thousands separator. 
text.tau2 
Text printed to identify betweenstudy variance

text.tau 
Text printed to identify 
text.I2 
Text printed to identify heterogeneity statistic
I 
legend 
A logical indicating whether a legend should be printed. 
Network metaanalysis using R package netmeta is described in detail in Schwarzer et al. (2015), Chapter 8.
Let n be the number of different treatments (nodes, vertices) in a network and let m be the number of existing comparisons (edges) between the treatments. If there are only twoarm studies, m is the number of studies. Let TE and seTE be the vectors of observed effects and their standard errors. Let W be the mxm diagonal matrix that contains the inverse variance 1 / seTE^2.
The given comparisons define the network structure. Therefrom an mxn design matrix X (edgevertex incidence matrix) is formed; for more precise information, see Rücker (2012). Moreover, the nxn Laplacian matrix L and its MoorePenrose pseudoinverse L+ are calculated (both matrices play an important role in graph theory and electrical network theory). Using these matrices, the variances based on both direct and indirect comparisons can be estimated. Moreover, the hat matrix H can be estimated by H = XL+X^tW = X(X^t W X)^+X^tW and finally consistent treatment effects can be estimated by applying the hat matrix to the observed (potentially inconsistent) effects. H is a projection matrix which maps the observed effects onto the consistent (n1)dimensional subspace. This is the Aitken estimator (Senn et al., 2013). As in pairwise metaanalysis, the Q statistic measures the deviation from consistency. Q can be separated into parts for each pairwise metaanalysis and a part for remaining inconsistency between comparisons.
Often multiarm studies are included in a network metaanalysis. In multiarm studies, the treatment effects on different comparisons are not independent, but correlated. This is accounted for by reweighting all comparisons of each multiarm study. The method is described in Rücker (2012) and Rücker and Schwarzer (2014).
Comparisons belonging to multiarm studies are identified by
identical study labels (argument studlab
). It is therefore
important to use identical study labels for all comparisons
belonging to the same multiarm study, e.g., study label
"Willms1999" for the threearm study in the data example (Senn et
al., 2013). The function netmeta then automatically accounts for
withinstudy correlation by reweighting all comparisons of each
multiarm study.
Data entry for this function is in contrastbased format,
that is, data are given as contrasts (differences) between two
treatments (argument TE
) with standard error (argument
seTE
). In principle, metaanalysis functions from R package
meta, e.g. metabin
for binary outcomes or
metacont
for continuous outcomes, can be used to
calculate treatment effects separately for each treatment
comparison which is a rather tedious enterprise. If data are
provided in armbased format, that is, data are given for
each treatment arm separately (e.g. number of events and
participants for binary outcomes), a much more convenient way to
transform data into contrastbased form is available. Function
pairwise
can automatically transform data with binary
outcomes (using the metabin
function from R package
meta), continuous outcomes (metacont
function), incidence rates (metainc
function), and
generic outcomes (metagen
function). Additional
arguments of these functions can be provided (see help page of
function pairwise
).
Note, all pairwise comparisons must be provided for a multiarm
study. Consider a multiarm study of p treatments with known
variances. For this study, treatment effects and standard errors
must be provided for each of p(p  1) / 2 possible
comparisons. For instance, a threearm study contributes three
pairwise comparisons, a fourarm study even six pairwise
comparisons. Function pairwise
automatically
calculates all pairwise comparisons for multiarm studies.
A simple random effects model assuming that a constant
heterogeneity variance is added to each comparison of the network
can be defined via a generalised methods of moments estimate of the
betweenstudies variance \tau^2
(Jackson et al., 2012). This
is added to the observed sampling variance seTE^2
of each
comparison in the network (before appropriate adjustment for
multiarm studies). Then, as in standard pairwise metaanalysis,
the procedure is repeated with the resulting enlarged standard
errors.
For the randomeffects model, the direct treatment estimates are
based on the common betweenstudy variance \tau^2
from the
network metaanalysis.
Internally, both common and random effects models are calculated
regardless of values choosen for arguments common
and
random
. Accordingly, the network estimates for the random
effects model can be extracted from component TE.random
of
an object of class "netmeta"
even if argument random =
FALSE
. However, all functions in R package netmeta will
adequately consider the values for common
and
random
. E.g. function print.summary.netmeta
will not print results for the random effects model if random
= FALSE
.
By default, treatment names are not abbreviated in
printouts. However, in order to get more concise printouts,
argument nchar.trts
can be used to define the minimum number
of characters for abbreviated treatment names (see
abbreviate
, argument minlength
). R function
treats
is utilised internally to create abbreviated
treatment names.
Names of treatment comparisons are created by concatenating
treatment labels of pairwise comparisons using sep.trts
as
separator (see paste
). These comparison names are
used in the covariance matrices Cov.common
and
Cov.random
and in some R functions, e.g,
decomp.design
. By default, a colon is used as the
separator. If any treatment label contains a colon the following
characters are used as separator (in consecutive order):
""
, "_"
, "/"
, "+"
, "."
,
""
, and "*"
. If all of these characters are used in
treatment labels, a corresponding error message is printed asking
the user to specify a different separator.
An object of class netmeta
with corresponding print
,
summary
, forest
, and netrank
functions. The
object is a list containing the following components:
studlab , treat1 , treat2 , TE , seTE 
As defined above. 
seTE.adj.common , seTE.adj.random 
Standard error of treatment estimate, adjusted for multiarm studies. 
design 
Design of study providing pairwise comparison. 
n1 , n2 , event1 , event2 , incr 
As defined above. 
mean1 , mean2 , sd1 , sd2 , time1 , time2 
As defined above. 
sd1 , sd2 , time1 , time2 
As defined above. 
k 
Total number of studies. 
m 
Total number of pairwise comparisons. 
n 
Total number of treatments. 
d 
Total number of designs (corresponding to the unique set of treatments compared within studies). 
trts 
Treatments included in network metaanalysis. 
k.trts 
Number of studies evaluating a treatment. 
n.trts 
Number of observations receiving a treatment (if
arguments 
events.trts 
Number of events observed for a treatment (if
arguments 
multiarm 
Logical vector to identify pairwise comparisons from multiarm studies. 
n.arms 
Number of treatment arms in study providing pairwise comparison. 
studies 
Vector with unique study labels. 
narms 
Number of arms for each study. 
designs 
Vector with unique designs present in the network. A design corresponds to the set of treatments compared within a study. 
designs 
Vector with unique direct comparisons present in the network. 
TE.nma.common , TE.nma.random 
A vector of length m of consistent treatment effects estimated by network metaanalysis (nma) (common / random effects model). 
seTE.nma.common , seTE.nma.random 
A vector of length m of effective standard errors estimated by network metaanalysis (common / random effects model). 
lower.nma.common , lower.nma.random 
A vector of length m of lower confidence interval limits for consistent treatment effects estimated by network metaanalysis (common effects / random effects model). 
upper.nma.common , upper.nma.random 
A vector of length m of upper confidence interval limits for the consistent treatment effects estimated by network metaanalysis (common effects / random effects model). 
statistic.nma.common , statistic.nma.random 
A vector of length m of zvalues for test of treatment effect for individual comparisons (common / random effects model). 
pval.nma.common , pval.nma.random 
A vector of length m of pvalues for test of treatment effect for individual comparisons (common / random effects model). 
leverage.common 
A vector of length m of leverages, interpretable as factors by which variances are reduced using information from the whole network. 
w.common , w.random 
A vector of length m of weights of individual studies (common / random effects model). 
Q.common 
A vector of length m of contributions to total heterogeneity / inconsistency statistic. 
TE.common , TE.random 
nxn matrix with estimated overall treatment effects (common / random effects model). 
seTE.common , seTE.random 
nxn matrix with standard errors (common / random effects model). 
lower.common , upper.common , lower.random , upper.random 
nxn matrices with lower and upper confidence interval limits (common / random effects model). 
statistic.common , pval.common , statistic.random , pval.random 
nxn matrices with zvalue and pvalue for test of overall treatment effect (common / random effects model). 
seTE.predict 
nxn matrix with standard errors for prediction intervals. 
lower.predict , upper.predict 
nxn matrices with lower and upper prediction interval limits. 
prop.direct.common , prop.direct.random 
A named vector of the direct evidence proportion of each network estimate. (common effects / random effects model). 
TE.direct.common , TE.direct.random 
nxn matrix with estimated treatment effects from direct evidence (common effects / random effects model). 
seTE.direct.common , seTE.direct.random 
nxn matrix with estimated standard errors from direct evidence (common effects / random effects model). 
lower.direct.common , upper.direct.common , lower.direct.random 
nxn matrices with lower and upper confidence interval limits from direct evidence (common / random effects model). 
upper.direct.random 
nxn matrices with lower and upper confidence interval limits from direct evidence (common effects / random effects model). 
statistic.direct.common , pval.direct.common , statistic.direct.random 
nxn matrices with zvalue and pvalue for test of overall treatment effect from direct evidence (common / random effects model). 
pval.direct.random 
nxn matrices with zvalue and pvalue for test of overall treatment effect from direct evidence (common / random effects model). 
TE.indirect.common , TE.indirect.random 
nxn matrix with estimated treatment effects from indirect evidence (common / random effects model). 
seTE.indirect.common , seTE.indirect.random 
nxn matrix with estimated standard errors from indirect evidence (common / random effects model). 
lower.indirect.common , upper.indirect.common , lower.indirect.random 
nxn matrices with lower and upper confidence interval limits from indirect evidence (common / random effects model). 
upper.indirect.random 
nxn matrices with lower and upper confidence interval limits from indirect evidence (common / random effects model). 
statistic.indirect.common , pval.indirect.common , statistic.indirect.random 
nxn matrices with zvalue and pvalue for test of overall treatment effect from indirect evidence (common / random effects model). 
pval.indirect.random 
nxn matrices with zvalue and pvalue for test of overall treatment effect from indirect evidence (common / random effects model). 
Q 
Overall heterogeneity / inconsistency statistic. 
df.Q 
Degrees of freedom for test of heterogeneity / inconsistency. 
pval.Q 
Pvalue for test of heterogeneity / inconsistency. 
I2 , lower.I2 , upper.I2 
Isquared, lower and upper confidence limits. 
tau 
Squareroot of betweenstudy variance. 
Q.heterogeneity 
Overall heterogeneity statistic. 
df.Q.heterogeneity 
Degrees of freedom for test of overall heterogeneity. 
pval.Q.heterogeneity 
Pvalue for test of overall heterogeneity. 
Q.inconsistency 
Overall inconsistency statistic. 
df.Q.inconsistency 
Degrees of freedom for test of overall inconsistency. 
pval.Q.inconsistency 
Pvalue for test of overall inconsistency. 
Q.decomp 
Data frame with columns 'treat1', 'treat2', 'Q', 'df' and 'pval.Q', providing heterogeneity statistics for each pairwise metaanalysis of direct comparisons. 
A.matrix 
Adjacency matrix (nxn). 
X.matrix 
Design matrix (mxn). 
B.matrix 
Edgevertex incidence matrix (mxn). 
L.matrix.common , L.matrix.random 
Laplacian matrix (nxn). 
Lplus.matrix.common , Lplus.matrix.random 
MoorePenrose pseudoinverse of the Laplacian matrix (nxn). 
Q.matrix 
Matrix of heterogeneity statistics for pairwise metaanalyses, where direct comparisons exist (nxn). 
G.matrix 
Matrix with variances and covariances of comparisons (mxm). G is defined as BL+B^t. 
H.matrix.common , H.matrix.random 
Hat matrix (mxm), defined as H = GW = BL+B^tW. 
n.matrix 
nxn matrix with number of
observations in direct comparisons (if arguments 
events.matrix 
nxn matrix with number of events
in direct comparisons (if arguments 
P.common , P.random 
nxn matrix with direct evidence proportions (common / random effects model). 
Cov.common 
Variancecovariance matrix (common effects model) 
Cov.random 
Variancecovariance matrix (random effects model) 
sm , level , level.ma 
As defined above. 
common , random 
As defined above. 
prediction , level.predict 
As defined above. 
reference.group , baseline.reference , small.values , all.treatments 
As defined above. 
seq , tau.preset , tol.multiarm , tol.multiarm.se 
As defined above. 
details.chkmultiarm , sep.trts , nchar.trts 
As defined above. 
backtransf , title , warn , warn.deprecated 
As defined above. 
call 
Function call. 
version 
Version of R package netmeta used to create object. 
R function rma.mv
from R package
metafor (Viechtbauer 2010) is called internally to estimate
the betweenstudy variance \tau^2
for the (restricted)
maximum likelihood method. For binary outcomes, incidence rates,
and the mean difference, the variancecovariance matrix is
calculated if arguments event1
, event2
, n1
,
and n2
(binary outcomes); event1
, event2
,
time1
, and time2
(incidence rates); n1
,
n2
, sd1
, and sd2
(mean difference) are
provided. For data sets preprocessed with pairwise
the respective variables are selected automatically.
Gerta Rücker gerta.ruecker@uniklinikfreiburg.de, Guido Schwarzer guido.schwarzer@uniklinikfreiburg.de
Jackson D, White IR, Riley RD (2012): Quantifying the impact of betweenstudy heterogeneity in multivariate metaanalyses. Statistics in Medicine, 31, 3805–20
Rücker G (2012): Network metaanalysis, electrical networks and graph theory. Research Synthesis Methods, 3, 312–24
Rücker G, Schwarzer G (2014): Reduce dimension or reduce weights? Comparing two approaches to multiarm studies in network metaanalysis. Statistics in Medicine, 33, 4353–69
Schwarzer G, Carpenter JR, Rücker G (2015): MetaAnalysis with R (Use R!). Springer International Publishing, Switzerland
Senn S, Gavini F, Magrez D, Scheen A (2013): Issues in performing a network metaanalysis. Statistical Methods in Medical Research, 22, 169–89
Viechtbauer W (2010): Conducting MetaAnalyses in R with the metafor Package. Journal of Statistical Software, 36, 1–48
pairwise
, forest.netmeta
,
netrank
, metagen
data(smokingcessation)
# Transform data from armbased format to contrastbased format
#
p1 < pairwise(list(treat1, treat2, treat3),
event = list(event1, event2, event3), n = list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# Conduct random effects network metaanalysis
#
net1 < netmeta(p1, common = FALSE)
net1
## Not run:
data(Senn2013)
# Conduct common effects network metaanalysis
#
net2 < netmeta(TE, seTE, treat1, treat2, studlab,
data = Senn2013, sm = "MD", random = FALSE)
net2
net2$Q.decomp
# Comparison with reference group
#
print(net2, reference = "plac")
# Conduct random effects network metaanalysis
#
net3 < netmeta(TE, seTE, treat1, treat2, studlab,
data = Senn2013, sm = "MD", common = FALSE)
net3
# Change printing order of treatments with placebo last and use
# long treatment names
#
trts < c("acar", "benf", "metf", "migl", "piog",
"rosi", "sita", "sulf", "vild", "plac")
net4 < netmeta(TE, seTE, treat1.long, treat2.long, studlab,
data = Senn2013, sm = "MD", common = FALSE,
seq = trts, reference = "Placebo")
print(net4, digits = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.