nma.ab.cont conducts network meta-analysis for continuous outcomes using the arm-based approach similarly to Zhang et al (2014). It can be applied to estimate treatment effects, effect differences. Also, it can provide deviance information criterion (DIC) statistics for evaluating the goodness of fit; give trace plots and Gelman-Rubin diagnostics to check the MCMC convergence; generate posterior density plot for effects of multiple treatments.nma.ab.cont(s.id, t.id, mean, sd, total.n, trtname, model = "het_cor",
prior.type, a = 0.001, b = 0.001, c = 10,
param = c("mu", "diff", "best"),
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 = "", dic = FALSE, postdens = FALSE)t.id. If not specified, t.id is used as treatment names."hom", "het_ind", or "het_cor" (default). See "Details" for the modelsmodel = "hom" or "het_ind", it can be set as "unif" (uniform prior for standard deviation, default) or "invgamma" (inverse gamma priorprior.type = "invgamma" for model "hom" or "het_ind". The defaults for both parameters arprior.type = "unif" for model "hom" or "het_ind". The default is 10.paramparam. TRUE indicates higher sample mean of the continuous outcomes implying better treatment,n.adapt. This argument and the following n.iter, n.burnin, n.chains, n.n.iter/2.FALSE. If TRUE, a txt file, which contains the point estimates of the potential scale reduction factor (psrf) and their upper confidence liparam (except "best"), and trace plots would be drew for the specified effect sizes and saved in the current working directory. TheFALSE. If TRUE, n.chains must be greater than 1.TRUE, a pdf file containing the plot would be written in the current working directory. The default is FALSE.nma.ab.cont returns a list with estimations of effect sizes specified in param. Also, if the argument dic is set as TRUE, the deviance information criterion (DIC) statistics would be returned in the output list. In addition, if conv.diag is set as TRUE, a txt file containing the point estimates of the potential scale reduction factor (psrf) and their upper confidence limits by Gelman and Rubin (1992) would be saved in the current working directory. If postdens is set as TRUE, the posterior densities of effects of multiple treatments would be saved as a pdf file. If trace is specified, the trace plots are saved as png files.model as "het_cor". If we reduce $\mathbf{R}_{K}$ to a $K \times K$ identity matrix, then it corresponds to model "het_ind". If we further let $\sigma_{k} = \sigma$ for $k = 1, 2, \ldots, K$, then it corresponds to model "hom". In addition, for the model "het_ind" and "hom", setting prior.type as "invgamma" implies using inverse-gamma priors with shape and scale parameters $a, b$ for $\sigma_{k}$ or $\sigma$, and "unif" implies uniform priors $U(0, c)$.nma.ab, nma.ab.py, nma.ab.followupdata(parkinson)
# increase n.iter to reach convergence of MCMC
cont.out <- nma.ab.cont(parkinson$sid, parkinson$tid,
parkinson$mean, parkinson$sd, parkinson$n,
model = "hom", prior.type = "unif", param = c("mu", "diff", "best"),
n.adapt = 1000, n.iter = 100, dic = TRUE)Run the code above in your browser using DataLab