Skip to contents

Ported from multinma::plot.stan_nma() (Phillippo et al. 2020), which hands the posterior draws to bayesplot. Diverging transitions, a high maximum Rhat, or a low effective sample size all mean the posterior has not been explored, and nothing downstream of it is trustworthy.

Usage

# S3 method for class 'cpaic_mlnmr'
plot(
  x,
  y,
  ...,
  type = c("trace", "density", "hist", "pairs", "rhat", "neff"),
  pars = NULL
)

Arguments

x

A cmlnmr() fit.

y

Unused, for compatibility with the plot() generic.

...

Passed to the underlying bayesplot function.

type

"trace" (default), "density", "hist", "pairs", "rhat", or "neff".

pars

Character vector of parameter names to show. Defaults to the component effects beta, the interactions gamma, and, for a random-effects model, the heterogeneity tau.

Value

A ggplot object ("pairs" returns a bayesplot grid).

Examples

if (FALSE) {
plot(fit, type = "trace")
plot(fit, type = "pairs", pars = c("beta[1]", "tau[1]"))
}