netmeta(TE, seTE, treat1, treat2, studlab, data=NULL, subset=NULL, sm, level=0.95, level.comb=0.95, comb.fixed=TRUE, comb.random=FALSE, reference.group="", all.treatments=NULL, seq=NULL, tau.preset=NULL, title="", warn=TRUE)"RD", "RR", "OR", "AS",
    "MD", "SMD", or "HR"."NULL". If
        TRUE, matrices with all treatment effects, and confidence
        limits will be printed.netmeta with corresponding print,
  summary, forest, and netrank function. The
  object is a list containing the following components:
  c("")."NULL". If
        TRUE, matrices with all treatment effects, and
        confidence limits will be printed.Let n be the number of different treatments in a network and let m be the number of existing comparisons (edges) between the treatments. If there are only two-arm 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 B is formed; for more precise information, see Rücker (2012). Moreover, the nxn Laplacian matrix L and its Moore-Penrose 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 = BL+B^tW = B(B^t W B)^+B^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 (n-1)-dimensional subspace. This is the Aitken estimator (Senn et al., 2013). As in pairwise meta-analysis, the Q statistic measures the deviation from consistency. Q can be separated into parts for each pairwise meta-analysis and a part for remaining inconsistency between comparisons.
Often multi-arm studies are included in a network meta-analysis. In multi-arm studies, the treatment effects on different comparisons are not independent, but correlated. This is accounted for by reweighting all comparisons of each multi-arm study. The method is described in Rücker (2012) and Rücker and Schwarzer (2014).
  Comparisons belonging to multi-arm 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 multi-arm study, e.g., study label
  "Willms1999" for the three-arm study in the data example (Senn et
  al., 2013). The function netmeta then automatically accounts for
  within-study correlation by reweighting all comparisons of each
  multi-arm study.
  Data entry for this function is in contrast-based format,
  that is, data are given as contrasts (differences) between two
  treatments (argument TE) with standard error (argument
  seTE). In principle, meta-analysis 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
  arm-based 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
  contrast-based 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, e.g., to calculate Hedges' g or
  Cohen's d for continuous outcomes (see help page of function
  pairwise).
  
  Note, all pairwise comparisons must be provided for a multi-arm
  study. Consider a multi-arm 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 three-arm study contributes three
  pairwise comparisons, a four-arm study even six pairwise
  comparisons. Function pairwise automatically
  calculates all pairwise comparisons for multi-arm 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 between-studies
  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 multi-arm studies). Then, as in standard
  pairwise meta-analysis, the procedure is repeated with the resulting
  enlarged standard errors.
Rücker G (2012), Network meta-analysis, electrical networks and graph theory. Research Synthesis Methods, 3, 312--324.
Rücker G and Schwarzer G (2014), Reduce dimension or reduce weights? Comparing two approaches to multi-arm studies in network meta-analysis. Statistics in Medicine, 33, 4353--4369.
Schwarzer G, Carpenter JR and Rücker G (2015), Meta-Analysis with R (Use-R!). Springer International Publishing, Switzerland
Senn S, Gavini F, Magrez D, and Scheen A (2013), Issues in performing a network meta-analysis. Statistical Methods in Medical Research, 22(2), 169--189. First published online 2012 Jan 3.
pairwise, forest.netmeta, netrank, metagendata(Senn2013)
#
# Fixed effect model (default)
#
net1 <- netmeta(TE, seTE, treat1, treat2, studlab,
                data=Senn2013, sm="MD")
net1
net1$Q.decomp
#
# Comparison with reference group
#
netmeta(TE, seTE, treat1, treat2, studlab,
        data=Senn2013, sm="MD", reference="plac")
#
# Random effects model
#
net2 <- netmeta(TE, seTE, treat1, treat2, studlab,
                data=Senn2013, sm="MD", comb.random=TRUE)
net2
#
# Change printing order of treatments (placebo first)
#
trts <- c("plac", "acar", "benf", "metf", "migl", "piog",
          "rosi", "sita", "sulf", "vild")
net3 <- netmeta(TE, seTE, treat1, treat2, studlab,
                data=Senn2013, sm="MD",
                seq=trts)
print(summary(net3), digits=2)
Run the code above in your browser using DataLab