run_model {rnmamod}R Documentation

Perform Bayesian pairwise or network meta-analysis

Description

Performs a one-stage pairwise or network meta-analysis while addressing aggregate binary or continuous missing participant outcome data via the pattern-mixture model.

Usage

run_model(
  data,
  measure,
  model,
  assumption,
  heter_prior,
  mean_misspar,
  var_misspar,
  D,
  ref,
  base_risk,
  n_chains,
  n_iter,
  n_burnin,
  n_thin,
  inits = NULL
)

Arguments

data

A data-frame of the one-trial-per-row format with arm-level data. See 'Format' for the specification of the columns.

measure

Character string indicating the effect measure. For a binary outcome, the following can be considered: "OR", "RR" or "RD" for the odds ratio, relative risk, and risk difference, respectively. For a continuous outcome, the following can be considered: "MD", "SMD", or "ROM" for mean difference, standardised mean difference and ratio of means, respectively.

model

Character string indicating the analysis model with values "RE", or "FE" for the random-effects and fixed-effect model, respectively. The default argument is "RE".

assumption

Character string indicating the structure of the informative missingness parameter. Set assumption equal to one of the following: "HIE-COMMON", "HIE-TRIAL", "HIE-ARM", "IDE-COMMON", "IDE-TRIAL", "IDE-ARM", "IND-CORR", or "IND-UNCORR". The default argument is "IDE-ARM". The abbreviations "IDE", "HIE", and "IND" stand for identical, hierarchical and independent, respectively. "CORR" and "UNCORR" stand for correlated and uncorrelated, respectively.

heter_prior

A list of three elements with the following order: 1) a character string indicating the distribution with (currently available) values "halfnormal", "uniform", "lognormal", or "logt"; 2) two numeric values that refer to the parameters of the selected distribution. For "lognormal", and "logt" these numbers refer to the mean and precision, respectively. For "halfnormal", these numbers refer to zero and the scale parameter (equal to 4 or 1 being the corresponding precision of the scale parameter 0.5 or 1). For "uniform", these numbers refer to the minimum and maximum value of the distribution. See 'Details' in heterogeneity_param_prior.

mean_misspar

A scalar or numeric vector of two numeric values for the mean of the normal distribution of the informative missingness parameter (see 'Details'). The default argument is 0 and corresponds to the missing-at-random assumption. See also 'Details' in missingness_param_prior.

var_misspar

A positive non-zero number for the variance of the normal distribution of the informative missingness parameter. When the measure is "OR", "MD", or "SMD" the default argument is 1. When the measure is "ROM" the default argument is 0.04.

D

A binary number for the direction of the outcome. Set D = 1 for beneficial outcome and D = 0 for harmful outcome.

ref

An integer specifying the reference intervention. The number should match the intervention identifier under element t in data (See 'Format').

base_risk

A scalar, a vector of length three with elements sorted in ascending order, or a matrix with two columns and number of rows equal to the number of relevant trials. In the case of a scalar or vector, the elements should be in the interval (0, 1) (see 'Details'). If base_risk has not been defined, the function uses the median event risk for the reference intervention from the corresponding trials in data. This argument is only relevant for a binary outcome.

n_chains

Positive integer specifying the number of chains for the MCMC sampling; an argument of the jags function of the R-package R2jags. The default argument is 2.

n_iter

Positive integer specifying the number of Markov chains for the MCMC sampling; an argument of the jags function of the R-package R2jags. The default argument is 10000.

n_burnin

Positive integer specifying the number of iterations to discard at the beginning of the MCMC sampling; an argument of the jags function of the R-package R2jags. The default argument is 1000.

n_thin

Positive integer specifying the thinning rate for the MCMC sampling; an argument of the jags function of the R-package R2jags. The default argument is 1.

inits

A list with the initial values for the parameters; an argument of the jags function of the R-package R2jags. The default argument is NULL, and JAGS generates the initial values.

Format

The columns of the data-frame in the argument data refer to the following elements for a continuous outcome:

t An intervention identifier in each arm.
y The observed mean value of the outcome in each arm.
sd The observed standard deviation of the outcome in each arm.
m The number of missing participant outcome data in each arm.
n The number of randomised participants in each arm.

For a binary outcome, the columns of the data-frame in the argument data refer to the following elements:

t An intervention identifier in each arm.
r The observed number of events of the outcome in each arm.
m The number of missing participant outcome data in each arm.
n The number of randomised participants in each arm.

The number of rows in data equals the number of collected trials. Each element appears in data as many times as the maximum number of interventions compared in a trial of the dataset. In pairwise meta-analysis, the maximum number of arms is inherently two. The same holds for a network meta-analysis without multi-arm trials. In the case of network meta-analysis with multi-arm trials, the maximum number of arms exceeds two. See 'Examples' that illustrates the structure of data for a network with a maximum number of four arms. It is not a prerequisite of run_model that the multi-arm trials appear at the bottom of the dataset.

Details

The model runs in JAGS and the progress of the simulation appears on the R console. The output of run_model is used as an S3 object by other functions of the package to be processed further and provide an end-user-ready output.

The data_preparation function is called to prepare the data for the Bayesian analysis. data_preparation creates the pseudo-data-frames m_new, and I, that have the same dimensions with the element N. m_new takes the zero value for the observed trial-arms with unreported missing participant outcome data (i.e., m equals NA for the corresponding trial-arms), the same value with m for the observed trial-arms with reported missing participant outcome data, and NA for the unobserved trial-arms. I is a dummy pseudo-data-frame and takes the value one for the observed trial-arms with reported missing participant outcome data, the zero value for the observed trial-arms with unreported missing participant outcome data (i.e., m_new equals zero for the corresponding trial-arms), and NA for the unobserved trial-arms. Thus, I indicates whether missing participant outcome data have been collected for the observed trial-arms. If the user has not defined the element m in data, m_new and I take the zero value for all observed trial-arms to indicate that no missing participant outcome data have been collected for the analysed outcome. See 'Details' in data_preparation.

Furthermore, data_preparation sorts the interventions across the arms of each trial in an ascending order and correspondingly the remaining elements in data (see 'Format'). data_preparation considers the first column in t as being the control arm for every trial. Thus, this sorting ensures that interventions with a lower identifier are consistently treated as the control arm in each trial. This case is relevant in non-star-shaped networks.

The model is updated until convergence using the autojags function of the R-package R2jags with 2 updates and number of iterations and thinning equal to n_iter and n_thin, respectively.

To perform a Bayesian pairwise or network meta-analysis, the prepare_model function is called which contains the WinBUGS code as written by Dias et al. (2013a) for binomial and normal likelihood to analyse aggregate binary and continuous outcome data, respectively. prepare_model uses the consistency model (as described in Lu and Ades (2006)) to estimate all possible comparisons in the network. It also accounts for the multi-arm trials by assigning conditional univariate normal distributions on the underlying trial-specific effect size of comparisons with the baseline arm of the multi-arm trial (Dias et al., 2013a).

The code of Dias et al. (2013a) has been extended to incorporate the pattern-mixture model to adjust the underlying outcome in each arm of every trial for missing participant outcome data (Spineli et al., 2021; Spineli, 2019a; Turner et al., 2015). The assumptions about the missingness parameter are specified using the arguments mean_misspar and var_misspar. Specifically, run_model considers the informative missingness odds ratio in the logarithmic scale for binary outcome data (Spineli, 2019a; Turner et al., 2015; White et al., 2008), the informative missingness difference of means when measure is "MD" or "SMD", and the informative missingness ratio of means in the logarithmic scale when measure is "ROM" (Spineli et al., 2021; Mavridis et al., 2015).

When assumption is trial-specific (i.e., "IDE-TRIAL" or "HIE-TRIAL"), or independent (i.e., "IND-CORR" or "IND-UNCORR"), only one numeric value can be assigned to mean_misspar because the same missingness scenario is applied to all trials and trial-arms of the dataset, respectively. When assumption is "IDE-ARM" or "HIE-ARM", a maximum of two different or identical numeric values can be assigned as a vector to mean_misspars: the first value refers to the experimental arm, and the second value refers to the control arm of a trial. In the case of a network, the first value is considered for all non-reference interventions and the second value is considered for the reference intervention of the network (i.e., the intervention with identifier equal to ref). This is necessary to ensure transitivity in the assumptions for the missingness parameter across the network (Spineli, 2019b).

When there is at least one trial-arm with unreported missing participant outcome data (i.e., m equals NA for the corresponding trial-arms) or when missing participant outcome data have not been collected for the analysed outcome (i.e., m is missing in data), run_model assigns the assumption "IND-UNCORR" to assumption.

Currently, there are no empirically-based prior distributions for the informative missingness parameters. The user may refer to Spineli (2019), Turner et al. (2015), Mavridis et al. (2015), and White et al. (2008) to determine mean_misspar and select a proper value for var_misspar.

The scalar base_risk refers to a fixed baseline risk for the selected reference intervention (as specified with ref). When base_risk is a three-element vector, it refers to a random baseline risk and the elements should be sorted in ascending order as they refer to the lower bound, mean value, and upper bound of the 95% confidence interval for the baseline risk for the selected reference intervention. The baseline_model function is called to calculate the mean and variance of the approximately normal distribution of the logit of an event for ref using these three elements (Dias et al., 2018). When base_risk is a matrix, it refers to the predicted baseline risk with first column being the number of events, and second column being the sample size of the corresponding trials on the selected reference intervention. Then the baseline_model function is called that contains the WinBUGS code as written by Dias et al. (2013b) for the hierarchical baseline model. The posterior mean and precision of the predictive distribution of the logit of an event for the selected reference intervention are plugged in the WinBUGS code for the relative effects model (via the prepare_model function). The matrix base_risk should not comprise the trials in data that include the ref, unless justified (Dias et al., 2018).

To obtain unique absolute risks for each intervention, the network meta-analysis model has been extended to incorporate the transitive risks framework, namely, an intervention has the same absolute risk regardless of the comparator intervention(s) in a trial (Spineli et al., 2017). The absolute risks are a function of the odds ratio (the base-case effect measure for a binary outcome) and the selected baseline risk for the reference intervention (ref) (Appendix in Dias et al., 2013a). We advocate using the odds ratio as an effect measure for its desired mathematical properties. Then, the relative risk and risk difference can be obtained as a function of the absolute risks of the corresponding interventions in the comparison of interest. Hence, regardless of the selected measure for a binary outcome, run_model performs pairwise or network meta-analysis based on the odds ratio.

Value

A list of R2jags output on the summaries of the posterior distribution, and the Gelman-Rubin convergence diagnostic (Gelman et al., 1992) of the following monitored parameters for a fixed-effect pairwise meta-analysis:

EM

The estimated summary effect measure (according to the argument measure).

EM_LOR

The estimated summary odd ratio in the logarithmic scale when measure = "RR" or measure = "RD".

dev_o

The deviance contribution of each trial-arm based on the observed outcome.

hat_par

The fitted outcome at each trial-arm.

phi

The informative missingness parameter.

For a fixed-effect network meta-analysis, the output additionally includes:

SUCRA

The surface under the cumulative ranking curve for each intervention.

SUCRA_LOR

The surface under the cumulative ranking curve for each intervention under the odds ratio effect measure when measure = "RR" or measure = "RD".

effectiveneness

The ranking probability of each intervention for every rank.

For a random-effects pairwise meta-analysis, the output additionally includes the following elements:

EM_pred

The predicted summary effect measure (according to the argument measure).

EM_pred_LOR

The predicted summary odds ratio in the logarithmic scale when measure = "RR" or measure = "RD".

delta

The estimated trial-specific effect measure (according to the argument measure).

tau

The between-trial standard deviation.

In network meta-analysis, EM and EM_pred refer to all possible pairwise comparisons of interventions in the network. Furthermore, tau is typically assumed to be common for all observed comparisons in the network. For a multi-arm trial, we estimate a total of T-1 delta for comparisons with the baseline intervention of the trial (found in the first column of the element t), with T being the number of interventions in the trial.

Furthermore, the output includes the following elements:

leverage_o

The leverage for the observed outcome at each trial-arm.

sign_dev_o

The sign of the difference between observed and fitted outcome at each trial-arm.

model_assessment

A data-frame on the measures of model assessment: deviance information criterion, number of effective parameters, and total residual deviance.

indic

The sign of basic parameters in relation to the reference intervention as specified in argument reg

jagsfit

An object of S3 class jags with the posterior results on all monitored parameters to be used in the mcmc_diagnostics function.

The run_model function also returns the arguments data, measure, model, assumption, heter_prior, mean_misspar, var_misspar, D, ref, base_risk, n_chains, n_iter, n_burnin, and n_thin as specified by the user to be inherited by other functions of the package.

Author(s)

Loukia M. Spineli

References

Cooper NJ, Sutton AJ, Morris D, Ades AE, Welton NJ. Addressing between-study heterogeneity and inconsistency in mixed treatment comparisons: Application to stroke prevention treatments in individuals with non-rheumatic atrial fibrillation. Stat Med 2009;28(14):1861–81. doi: 10.1002/sim.3594

Dias S, Ades AE, Welton NJ, Jansen JP, Sutton AJ. Network Meta-Analysis for Decision Making. Chichester (UK): Wiley; 2018.

Dias S, Sutton AJ, Ades AE, Welton NJ. Evidence synthesis for decision making 2: a generalized linear modeling framework for pairwise and network meta-analysis of randomized controlled trials. Med Decis Making 2013a;33(5):607–17. doi: 10.1177/0272989X12458724

Dias S, Welton NJ, Sutton AJ, Ades AE. Evidence synthesis for decision making 5: the baseline natural history model. Med Decis Making 2013b;33(5):657–70. doi: 10.1177/0272989X13485155

Gelman A, Rubin DB. Inference from iterative simulation using multiple sequences. Stat Sci 1992;7(4):457–72. doi: 10.1214/ss/1177011136

Lu G, Ades AE. Assessing evidence inconsistency in mixed treatment comparisons. J Am Stat Assoc 2006;101:447–59. doi: 10.1198/016214505000001302

Mavridis D, White IR, Higgins JP, Cipriani A, Salanti G. Allowing for uncertainty due to missing continuous outcome data in pairwise and network meta-analysis. Stat Med 2015;34(5):721–41. doi: 10.1002/sim.6365

Spineli LM, Kalyvas C, Papadimitropoulou K. Continuous(ly) missing outcome data in network meta-analysis: a one-stage pattern-mixture model approach. Stat Methods Med Res 2021;30(4):958–75. doi: 10.1177/0962280220983544

Spineli LM. An empirical comparison of Bayesian modelling strategies for missing binary outcome data in network meta-analysis. BMC Med Res Methodol 2019a;19(1):86. doi: 10.1186/s12874-019-0731-y

Spineli LM. Modeling missing binary outcome data while preserving transitivity assumption yielded more credible network meta-analysis results. J Clin Epidemiol 2019b;105:19–26. doi: 10.1016/j.jclinepi.2018.09.002

Spineli LM, Brignardello-Petersen R, Heen AF, Achille F, Brandt L, Guyatt GH, et al. Obtaining absolute effect estimates to facilitate shared decision making in the context of multiple-treatment comparisons. Abstracts of the Global Evidence Summit, Cape Town, South Africa. Cochrane Database of Systematic Reviews 2017;9(Suppl 1):18911.

Turner NL, Dias S, Ades AE, Welton NJ. A Bayesian framework to account for uncertainty due to missing binary outcome data in pairwise meta-analysis. Stat Med 2015;34(12):2062–80. doi: 10.1002/sim.6475

White IR, Higgins JP, Wood AM. Allowing for uncertainty due to missing data in meta-analysis–part 1: two-stage methods. Stat Med 2008;27(5):711–27. doi: 10.1002/sim.3008

See Also

autojags, baseline_model, data_preparation, heterogeneity_param_prior, jags, missingness_param_prior, prepare_model

Examples

data("nma.baker2009")

# Show the first six trials of the dataset
head(nma.baker2009)


# Perform a random-effects network meta-analysis
# Note: Ideally, set 'n_iter' to 10000 and 'n_burnin' to 1000
run_model(data = nma.baker2009,
          measure = "OR",
          model = "RE",
          assumption = "IDE-ARM",
          heter_prior = list("halfnormal", 0, 1),
          mean_misspar = c(0, 0),
          var_misspar = 1,
          D = 0,
          ref = 1,
          n_chains = 3,
          n_iter = 1000,
          n_burnin = 100,
          n_thin = 1)



[Package rnmamod version 0.4.0 Index]