nma.ab.py {pcnetmeta} | R Documentation |
Arm-Based Network Meta-Analysis for Count Datasets with Exposure Time in Person-Years Reported
Description
Performs the arm-based network meta-analysis for count datasets when the exposure times (in person-years) are reported, which estimates the treatment-specific rate, rate ratio between treatments, and their logarithms.
Usage
nma.ab.py(s.id, t.id, event.n, py, data, trtname,
param = c("lograte", "logratio", "rank.prob"), model = "het_cor",
prior.type, a = 0.001, b = 0.001, c = 10, higher.better = FALSE,
digits = 4, n.adapt = 5000, n.iter = 100000,
n.burnin = floor(n.iter/2), n.chains = 3,
n.thin = max(1, floor((n.iter - n.burnin)/100000)),
conv.diag = FALSE, trace = NULL, dic = FALSE, postdens = FALSE,
mcmc.samples = FALSE)
Arguments
s.id |
a numeric or character vector specifying study ID, or the corresponding column name in the argument |
t.id |
a numeric or character vector specifying treatment ID, or the corresponding column name in the argument |
event.n |
a numeric vector of non-negative integers, specifying number of events in each study's treatment group, or the corresponding column name in the argument |
py |
a numeric vector of non-negative numbers, specifying exposure time in person-years in each study's treatment group, or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the network meta-analysis. If |
trtname |
a vector of character strings specifying the treatment names for the corresponding treatment IDs according to their order in |
param |
a vector of character strings specifying the effect measures to be estimated. The default includes log treatment-specific rate ( |
model |
a character string specifying which Bayesian hierarchical model to be applied in the arm-based network meta-analysis. This argument can be set as |
prior.type |
prior distribution of variances and/or covariances of random effects. If |
a , b |
positive numbers, specifying the shape and scale parameters of inverse gamma priors for variance(s) of random effects if using |
c |
positive number, specifying the upper bound of uniform prior for standard deviation(s) of random effects if using |
higher.better |
an optional logical value which needs to be specified when estimating the treatment rank probabilities (i.e., "rank.prob" is included in argument |
digits |
a positive integer specifying the digits after the decimal point of the effect measures estimates. The default is 4. |
n.adapt |
the number of iterations for adaptation in Markov chain Monte Carlo (MCMC) algorithm. The default is 5,000. If a warning "adaptation incomplete" appears, users may increase |
n.iter |
the total number of iterations in each MCMC chain. The default is 100,000. |
n.burnin |
the number of iterations for burn-in period. The default is |
n.chains |
the number of MCMC chains. The default is 3. |
n.thin |
a positive integer specifying the thinning rate. The default is the thinning rate which yields no more than 100,000 iterations remaining in each chain. |
conv.diag |
a logical value indicating whether to perform MCMC convergence diagnostic. The default is |
trace |
a vector of character strings of effect measures. The character strings should be selected from those specified in |
dic |
a logical value indicating whether to calculate the deviance information criterion (DIC) value. The default is |
postdens |
a logical value indicating whether to draw the posterior density plots for treatment-specific rates. If |
mcmc.samples |
a logical value indicating whether to save MCMC posterior samples in the output object. The default is |
Details
Suppose that a network meta-analysis collects studies on
treatments, where each study investigates a subset of the
treatments. The exposure time in person-years and the count of events in each treatment group are reported. Label the studies from
to
and the treatments from
to
. Let
be the subset of the
treatments that is compared in the
th study. Also, in the
th study, let
be the number of events in treatment group
, and
be the corresponding exposure time in person-years. The arm-based network meta-analysis model for these settings is constructed as:
where is a
positive definite correlation matrix. The
's are treatment-specific fixed effects, and the random effects
are correlated within each study with the covariance matrix
.
An unstructured covariance matrix in the model above corresponds to
model
= "het_cor"
. The inverse-Wishart prior can be assigned to . Alternatively, using the separation strategy by Cholesky decomposition (
prior.type
= "chol"
), uniform priors are assigned to the standard deviations in
and non-informative priors are assigned to the correlation components (Barnard et al., 2000; Lu and Ades, 2009; Wei and Higgins, 2013; Lin and Chu, 2018). Denote
as the standard deviation of
and
, then the correlation matrix is
. If we assume that all of the off-diagonal elements in
are equal, say to
, then this model corresponds to
model
= "het_eqcor"
. If we further assume the homogeneity of variances of the random effects, that is, for
, then the model is
"hom_eqcor"
. In addition, for the models "hom_eqcor"
and "het_eqcor"
, setting prior.type
as "invgamma"
implies using inverse-gamma priors with shape and scale parameters, and
, for
or
, and
"unif"
implies uniform priors for
or
.
Value
nma.ab.py
returns a list with estimates of effect measures specified in param
. If the argument dic
= TRUE
, the deviance information criterion (DIC) statistic will be returned in the output list. In addition, if conv.diag
= TRUE
, a .txt file containing the point estimates of the potential scale reduction factor and their upper confidence limits by Gelman and Rubin (1992) will be saved in users' current working directory. If postdens
= TRUE
, the posterior densities of treatment-specific absolute risks will be saved as a .pdf file. If trace
is specified, the trace plots are saved as .png files.
Note
Earlier versions (< 4.0.0) of JAGS do not guarantee exact reproducibility of the results. We recommend users to install the latest version (>= 4.0.0) of JAGS so that exact reproducibility can be ensured by specifying certain seeds.
References
Barnard J, McCulloch R, Meng XL (2000). "Modeling covariance matrices in terms of standard deviations and correlations, with application to shrinkage." Statistica Sinica, 10(4), 1281–1311.
Dias S, Sutton AJ, Ades AE, Welton NJ (2013). "Evidence synthesis for decision making 2: a generalized linear modeling framework for pairwise and network meta-analysis of randomized controlled trials." Medical Decision Making, 33(5), 607–617. <doi: 10.1177/0272989X12458724>
Gelman A, Rubin DB (1992). "Inference from iterative simulation using multiple sequences." Statistical Science, 7(4), 457–472. <doi: 10.1214/ss/1177011136>
Lin L, Chu H (2018). "Bayesian multivariate meta-analysis of multiple factors." Research Synthesis Methods, 9(2), 261–272. <doi: 10.1002/jrsm.1293>
Lin L, Zhang J, Hodges JS, Chu H (2017). "Performing arm-based network meta-analysis in R with the pcnetmeta package." Journal of Statistical Software, 80(5), 1–25. <doi: 10.18637/jss.v080.i05>
Lu G, Ades AE (2004). "Combination of direct and indirect evidence in mixed treatment comparisons." Statistics in Medicine, 23(20), 3105–3124. <doi: 10.1002/sim.1875>
Lu G, Ades AE (2009). "Modeling between-trial variance structure in mixed treatment comparisons." Biostatistics, 10(4), 792–805. <doi: 10.1093/biostatistics/kxp032>
Spiegelhalter DJ, Best NG, Carlin BP, Van Der Linde A (2002). "Bayesian measures of model complexity and fit." Journal of the Royal Statistical Society, Series B (Statistical Methodology), 64(4), 583–639. <doi: 10.1111/1467-9868.00353>
Wei Y, Higgins JPT (2013). "Bayesian multivariate meta-analysis with multiple outcomes." Statistics in Medicine, 32(17), 2911–2934. <doi: 10.1002/sim.5745>
Zhang J, Carlin BP, Neaton JD, Soon GG, Nie L, Kane R, Virnig BA, Chu H (2014). "Network meta-analysis of randomized clinical trials: Reporting the proper summaries." Clinical Trials, 11(2), 246–262. <doi: 10.1177/1740774513498322>
See Also
nma.ab.bin
, nma.ab.cont
, nma.ab.followup
Examples
#data("dietaryfat")
# increase n.iter to reach convergence of MCMC
# increase n.adapt to enhance efficiency
#set.seed(1234)
#py.out <- nma.ab.py(s.id, t.id, r, py, data = dietaryfat, model = "het_cor",
# n.adapt = 300, n.iter = 100, n.chains = 1)