Main analysis
nma.model()
creates BUGS code and that will be put into nma.run()
and analysed through JAGS (Plummer 2017). The reference
parameter indicates the name of the treatment that will be seen as the ‘referent’ comparator, this is often a placebo of some sort. In our case, it is treatment 02. Since our outcome is dichotomous, and we are not interested in event rates, we are using the “binomial” family. In our case, we want to compare odds ratios, so we are using the \(logit\) link.
fixed_effects_model <- nma.model(data=dataprep,
outcome="events",
N="sampleSize",
reference="02",
family="binomial",
link="logit",
effects="fixed",
covariate="stroke",
prior.beta="EXCHANGEABLE")
random_effects_model <- nma.model(data=dataprep,
outcome="events",
N="sampleSize",
reference="02",
family="binomial",
link="logit",
effects="random",
covariate="stroke",
prior.beta="EXCHANGEABLE")
If you want to review the BUGS code, you can review it by outputting cat(random_effects_model$bugs)
.
The next step is to run the NMA model using nma.run()
. Since we are working in a Bayesian framework, we need to specify the number of adaptations, burn-ins, and iterations. A description of Bayesian MCMC is omitted here, we direct the reader to any introductory text on Bayesian Modelling (Lunn et al. 2012).