| nma.run | R Documentation | 
Takes bugs code from an object produced by nma.model and runs model using jags.
nma.run(
  model,
  monitor = "DEFAULT",
  DIC = TRUE,
  n.adapt = 1000,
  n.burnin = floor(n.iter/2),
  n.iter,
  thin = 1,
  n.chains = 3,
  inits = "DEFAULT"
)
| model | A  | 
| monitor | A vector of all variables that you would like to monitor. Default is "DEFAULT" which will monitor the relative treatment effects  | 
| DIC | Default is TRUE and nodes required to calculate the DIC and other fit statistics are monitored. Otherwise you may set it to FALSE. | 
| n.adapt | Number of adaptations for the mcmc chains. | 
| n.burnin | Number of burnin iterations for the mcmc chains. | 
| n.iter | Number of iterations for the mcmc chains. | 
| thin | Thinning factor for the mcmc chains. Default is 1. | 
| n.chains | Number of mcmc chains. Default is 3. | 
| inits | Specifies initial values and random number generator options for each chain. The "DEFAULT" option uses the R random seed to set the JAGS random
seeds. Non-default options are passed directly to  | 
nma.run returns an object of class BUGSnetRun which is a list containing the following components:
samples - The MCMC samples produced by running the BUGS model.
model - The BUGSnetModel object obtained from nma.model which was used to run jags.
scale - The scale of the outcome, based on the chosen family and link function.
trt.key - Treatments mapped to numbers, used to run BUGS code.
family - Family that was used for the NMA model (e.g normal, binomial, poisson)
link - Link function that was used for the NMA model (e.g normal, binomial, poisson)
nma.model, nma.fit, nma.league, nma.rank, nma.forest, nma.regplot, nma.trace, jags.model
data(diabetes.sim)
diabetes.slr <- data.prep(
  arm.data = diabetes.sim, 
  varname.t = "Treatment", 
  varname.s = "Study"
)
#Random effects, consistency model.
#Binomial family, cloglog link. This implies that the scale will be the Hazard Ratio.
diabetes.re.c <- nma.model(
  data = diabetes.slr,
  outcome = "diabetes", 
  N = "n",
  reference = "Placebo",
  family = "binomial",
  link = "cloglog",
  effects = "random",
  type = "consistency",
  time = "followup"
)
 
diabetes.re.c.res <- nma.run(
  model = diabetes.re.c,
  n.adapt = 100,
  n.burnin = 0,
  n.iter = 100
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.