netmetabin  R Documentation 
Provides three models for the network metaanalysis of binary data (MantelHaenszel method, based on the noncentral hypergeometric distribution, and the inverse variance method).
netmetabin( event1, n1, event2, n2, treat1, treat2, studlab, data = NULL, subset = NULL, sm, method = "MH", cc.pooled = FALSE, incr, allincr, addincr, allstudies, level = gs("level"), level.ma = gs("level.ma"), common = gs("common"), random = method == "Inverse" & (gs("random")  !is.null(tau.preset)), prediction = FALSE, level.predict = gs("level.predict"), reference.group = "", baseline.reference = TRUE, all.treatments = NULL, seq = NULL, tau.preset = NULL, tol.multiarm = 0.001, tol.multiarm.se = NULL, details.chkmultiarm = FALSE, details.chkdata = TRUE, sep.trts = ":", nchar.trts = 666, func.inverse = invmat, backtransf = gs("backtransf"), title = "", keepdata = gs("keepdata"), warn = TRUE, warn.deprecated = gs("warn.deprecated"), ... )
event1 
Number of events (first treatment). 
n1 
Number of observations (first treatment). 
event2 
Number of events (second treatment). 
n2 
Number of observations (second treatment) 
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,
i.e., 
method 
A character string indicating which method is to be
used for pooling of studies. One of 
cc.pooled 
A logical indicating whether 
incr 
A numerical value which is added to each cell count, i.e., to the numbers of events and nonevents, of all treatment arms in studies with zero events or nonevents in any of the treatment arms ("continuity correction"). 
allincr 
A logical indicating whether 
addincr 
A logical indicating whether 
allstudies 
A logical indicating whether studies with zero
events or nonevents in all treatment arms should be included in
an inverse variance metaanalysis (applies only if 
level 
The level used to calculate confidence intervals for individual studies. 
level.ma 
The level used to calculate confidence intervals for network estimates. 
common 
A logical indicating whether a common effects network metaanalysis should be conducted. 
random 
A logical indicating whether a random effects network metaanalysis should be conducted. 
prediction 
A logical indicating whether a prediction
interval should be printed (only considered if 
level.predict 
The level used to calculate prediction
interval for a new study (only considered if 
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 
all.treatments 
A logical or 
seq 
A character or numerical vector specifying the sequence of treatments in printouts. 
tau.preset 
An optional value for manually setting the
squareroot of the betweenstudy variance τ^2 (only
considered if 
tol.multiarm 
A numeric for the tolerance for consistency of
treatment estimates in multiarm studies which are consistent by
design (only considered if 
tol.multiarm.se 
A numeric for the tolerance for consistency
of standard errors in multiarm studies which are consistent by
design (only considered if the argument is not 
details.chkmultiarm 
A logical indicating whether treatment
estimates and / or variances of multiarm studies with
inconsistent results or negative multiarm variances should be
printed (only considered if 
details.chkdata 
A logical indicating whether number of events and participants of studies with inconsistent data 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 (see Details). 
func.inverse 
R function used to calculate the pseudoinverse
of the Laplacian matrix L (see 
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. 
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. 
... 
Additional arguments (to catch deprecated arguments). 
This function implements three models for the network metaanalysis of binary data:
The MantelHaenszel network metaanalysis model, as described
in Efthimiou et al. (2019) (method = "MH"
);
a network metaanalysis model using the noncentral
hypergeometric distribution with the Breslow approximation, as
described in Stijnen et al. (2010) (method = "NCH"
);
the inverse variance method for network metaanalysis
(method = "Inverse"
), also provided by
netmeta
.
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.
Data entry for this function is in contrastbased format,
that is, each line of the data corresponds to a single pairwise
comparison between two treatments (arguments treat1
,
treat2
, event1
, n1
, event2
, and
n2
). If data are provided in armbased format, that
is, number of events and participants are given for each treatment
arm separately, function pairwise
can be used to
transform the data to contrastbased format (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, the number of events and observations
must be provided for each treatment, for each of p(p
 1) / 2 possible comparisons in separate lines in the data. 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.
For method = "Inverse"
, 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
.
For the randomeffects model, the direct treatment estimates are based on the common betweenstudy variance τ^2 from the network metaanalysis.
For method = "MH"
and method = "NCH"
, only a common
effects model is available.
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 netmetabin
and netmeta
with
corresponding print
, summary
, forest
, and
netrank
functions. The object is a list containing the
following components:
studlab, treat1, treat2 
As defined above. 
n1, n2, event1, event2 
As defined above. 
TE 
Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio). 
seTE 
Standard error of treatment estimate. 
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. 
events.trts 
Number of events observed for a treatment. 
studies 
Study labels coerced into a factor with its levels sorted alphabetically. 
narms 
Number of arms for each study. 
designs 
Unique list of designs present in the network. A design corresponds to the set of treatments compared within a study. 
TE.common, seTE.common 
nxn matrix with estimated overall treatment effects and standard errors for common effects model. 
lower.common, upper.common 
nxn matrices with lower and upper confidence interval limits for common effects model. 
statistic.common, pval.common 
nxn matrices with zvalue and pvalue for test of overall treatment effect under common effects model. 
TE.random, seTE.random 
nxn matrix with
estimated overall treatment effects and standard errors for
random effects model (only available if 
lower.random, upper.random 
nxn matrices with
lower and upper confidence interval limits for random effects
model (only available if 
statistic.random, pval.random 
nxn matrices
with zvalue and pvalue for test of overall treatment effect
under random effects model (only available if 
TE.direct.common, seTE.direct.common 
nxn matrix with estimated treatment effects and standard errors from direct evidence under common effects model. 
lower.direct.common, upper.direct.common 
nxn matrices with lower and upper confidence interval limits from direct evidence under common effects model. 
statistic.direct.common, pval.direct.common 
nxn matrices with zvalue and pvalue for test of overall treatment effect from direct evidence under common effects model. 
TE.direct.random, seTE.direct.random 
nxn
matrix with estimated treatment effects and standard errors from
direct evidence under random effects model (only available if

lower.direct.random, upper.direct.random 
nxn
matrices with lower and upper confidence interval limits from
direct evidence under random effects model (only available if

statistic.direct.random,
pval.direct.random 
nxn matrices with zvalue and
pvalue for test of overall treatment effect from direct evidence
under random effects model (only available if 
Q 
Overall heterogeneity / inconsistency statistic. (only
available if 
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 (only available if 
tau 
Squareroot of betweenstudy variance (only available if

Q.heterogeneity 
Overall heterogeneity statistic. (only
available if 
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. 
A.matrix 
Adjacency matrix (nxn). 
H.matrix 
Hat matrix (mxm) 
n.matrix 
nxn matrix with number of observations in direct comparisons. 
events.matrix 
nxn matrix with number of events in direct comparisons. 
sm, method, level, level.ma 
As defined above. 
incr, allincr, addincr, allstudies, cc.pooled 
As defined above. 
common, random 
As defined above. 
prediction, level.predict 
As defined above. 
reference.group, baseline.reference, all.treatments 
As defined above. 
seq, tau.preset, tol.multiarm, tol.multiarm.se 
As defined above. 
details.chkmultiarm, details.chkdata 
As defined above. 
sep.trts, nchar.trts 
As defined above. 
backtransf, title, warn, warn.deprecated 
As defined above. 
data 
Data set (in contrastbased format). 
data.design 
List with data in armbased format (each list element corresponds to a single design). 
call 
Function call. 
version 
Version of R package netmeta used to create object. 
Orestis Efthimiou oremiou@gmail.com, Guido Schwarzer sc@imbi.unifreiburg.de
Efthimiou O, Rücker G, Schwarzer G, Higgins J, Egger M, Salanti G (2019): A MantelHaenszel model for network metaanalysis of rare events. Statistics in Medicine, 1–21, https://doi.org/10.1002/sim.8158
Senn S, Gavini F, Magrez D, Scheen A (2013): Issues in performing a network metaanalysis. Statistical Methods in Medical Research, 22, 169–89
Stijnen T, Hamza TH, Ozdemir P (2010): Random effects metaanalysis of event outcome in the framework of the generalized linear mixed model with applications in sparse data. Statistics in Medicine, 29, 3046–67
pairwise
, netmeta
data(Dong2013) # Only consider first ten studies (to reduce runtime of example) # first10 < subset(Dong2013, id <= 10) # Transform data from long armbased format to contrastbased # format. Argument 'sm' has to be used for odds ratio as summary # measure; by default the risk ratio is used in the metabin # function called internally. # p1 < pairwise(treatment, death, randomized, studlab = id, data = first10, sm = "OR") # Conduct MantelHaenszel network metaanalysis (without continuity # correction) # nb1 < netmetabin(p1, ref = "plac") nb1 # Obtain the league table # netleague(nb1) ## Not run: # Conduct MantelHaenszel network metaanalysis for the whole # dataset # p2 < pairwise(treatment, death, randomized, studlab = id, data = Dong2013, sm = "OR") netmetabin(p2, ref = "plac") # Conduct network metaanalysis using the noncentral # hypergeometric model (without continuity correction) # netmetabin(p2, ref = "plac", method = "NCH") # Conduct MantelHaenszel network metaanalysis (with continuity # correction of 0.5; include all studies) # netmetabin(p2, ref = "plac", cc.pooled = TRUE) data(Gurusamy2011) p3 < pairwise(treatment, death, n, studlab = study, data = Gurusamy2011, sm = "OR") # Conduct MantelHaenszel network metaanalysis (without continuity # correction) # netmetabin(p3, ref = "cont") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.