crossnma | R Documentation |
This function takes the JAGS model from an object produced by
crossnma.model
and runs it using
jags.model
from R package rjags.
crossnma(
x,
inits = NULL,
n.adapt = 1000,
n.burnin = floor(n.iter/2),
n.iter = 2000,
thin = max(1, floor((n.iter - n.burnin)/1000)),
n.chains = 2,
monitor = NULL,
level.ma = x$level.ma,
backtransf = x$backtransf,
quiet = TRUE,
n.thin = NULL
)
x |
An object produced by |
inits |
A list of lists with |
n.adapt |
Number of adaptations for the MCMC chains. |
n.burnin |
Number of burnin iterations for the MCMC
chains. Default is |
n.iter |
Number of iterations to run each MCMC chain. |
thin |
Thinning for the MCMC chains. Default is max(1, floor((n.iter - n.burnin) / 1000)), that is only thinning if there are more than 2000 iterations. |
n.chains |
Number of MCMC chains. |
monitor |
A character vector of the names of the parameters to be monitored. Basic parameters (depends on the analysis) will be automatically monitored and only additional parameters need to be specified. |
level.ma |
The level used to calculate credible intervals for network estimates. |
backtransf |
A logical indicating whether results should be
back transformed in printouts. If |
quiet |
A logical passed on to |
n.thin |
Deprecated argument (replaced by |
An object of class crossnma
which is a list containing the
following components:
jagsfit |
An "rjags" object produced when rjags package used to run the JAGS model. |
model |
The |
trt.key |
A table of treatment names and their correspondence to integers used in the JAGS model. |
inits , n.adapt , n.burnin , n.iter |
As defined above. |
thin , n.chains |
As defined above. |
call |
Function call. |
version |
Version of R package crossnma used to create object. |
Tasnim Hamza hamza.a.tasnim@gmail.com, Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de
crossnma.model
, jags.model
## Not run:
# We conduct a network meta-analysis assuming a random-effects
# model.
# The data comes from randomized-controlled trials and
# non-randomized studies (combined naively)
head(ipddata) # participant-level data
stddata # study-level 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
set.seed(1909)
fit <- crossnma(mod)
# Display the output
summary(fit)
plot(fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.