plot.crossnma {crossnma}R Documentation

Trace plot of MCMC output

Description

Produces a separate plot for each parameter in the JAGS model. Each plot shows iterations vs sampled values.

Usage

## S3 method for class 'crossnma'
plot(x, ...)

Arguments

x

An object generated by crossnma.

...

Additional arguments (passed on to traceplot)

Value

No return value (plot function).

Author(s)

Tasnim Hamza tasnim.hamza@ispm.unibe.ch

See Also

crossnma, traceplot

Examples

# 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
head(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
# (suppress warning 'Adaptation incomplete' due to n.adapt = 20)
fit <-
  suppressWarnings(crossnma(mod, n.adapt = 20,
    n.iter = 50, thin = 1, n.chains = 3))

# Trace plot of MCMC output
plot(fit)


[Package crossnma version 1.0.1 Index]