crossnma {crossnma}  R Documentation 
This function takes the JAGS model from an object produced by
crossnma.model
and runs it using jags.model
in
rjags package.
crossnma(
x,
n.adapt = 1000,
n.burnin = floor(n.iter/2),
n.iter = 10000,
thin = 1,
n.chains = 2,
quiet = TRUE,
monitor = NULL
)
x 
An object produced by 
n.adapt 
Number of adaptations for the MCMC chains. Default is 1000. 
n.burnin 
Number of burnin iterations for the MCMC chains. 
n.iter 
Number of iterations for the MCMC chains. 
thin 
Number of thinning for the MCMC chains. Default is 1. 
n.chains 
Number of MCMC chains. Default is 2. 
quiet 
A logical passed on to

monitor 
A vector of additional parameters to monitor. Default is NULL. 
An object of class crossnma
which is a list containing the
following components:
samples 
The MCMC samples produced by running the JAGS model. 
model 
The 
trt.key 
A table of treatment names and their correspondence to integers used in the JAGS model. 
call 
Function call. 
version 
Version of R package crossnma used to create object. 
Tasnim Hamza tasnim.hamza@ispm.unibe.ch, Guido Schwarzer sc@imbi.unifreiburg.de
# We conduct a network metaanalysis assuming a randomeffects
# model.
# The data comes from randomizedcontrolled trials and
# nonrandomized studies (combined naively)
head(ipddata) # participantlevel data
head(stddata) # studylevel data
# Create a JAGS model
mod < crossnma.model(treat, id, relapse, n, design,
prt.data = ipddata, std.data = stddata,
reference = "A", trt.effect = "random", method.bias = "naive")
# Fit JAGS model
# (suppress warning 'Adaptation incomplete' due to n.adapt = 20)
fit <
suppressWarnings(crossnma(mod, n.adapt = 20,
n.iter = 50, thin = 1, n.chains = 3))
# Display the output
summary(fit)
plot(fit)