pairs.stan_nma {multinma} | R Documentation |
Matrix of plots for a stan_nma
object
Description
A pairs()
method for stan_nma
objects, which calls
bayesplot::mcmc_pairs()
on the
underlying stanfit
object.
Usage
## S3 method for class 'stan_nma'
pairs(x, ..., pars, include = TRUE)
Arguments
x |
An object of class |
... |
Other arguments passed to
|
pars |
Optional character vector of parameter names to include in output. If not specified, all parameters are used. |
include |
Logical, are parameters in |
Value
A grid of ggplot objects produced by
bayesplot::mcmc_pairs()
.
Examples
## Not run:
## Parkinson's mean off time reduction
park_net <- set_agd_arm(parkinsons,
study = studyn,
trt = trtn,
y = y,
se = se,
sample_size = n)
# Fitting a RE model
park_fit_RE <- nma(park_net,
trt_effects = "random",
prior_intercept = normal(scale = 100),
prior_trt = normal(scale = 100),
prior_het = half_normal(scale = 5))
# We see a small number of divergent transition errors
# These do not go away entirely when adapt_delta is increased
# Try to diagnose with a pairs plot
pairs(park_fit_RE, pars = c("mu[4]", "d[3]", "delta[4: 3]", "tau"))
# Transforming tau onto log scale
pairs(park_fit_RE, pars = c("mu[4]", "d[3]", "delta[4: 3]", "tau"),
transformations = list(tau = "log"))
# The divergent transitions occur in the upper tail of the heterogeneity
# standard deviation. In this case, with only a small number of studies, there
# is not very much information to estimate the heterogeneity standard deviation
# and the prior distribution may be too heavy-tailed. We could consider a more
# informative prior distribution for the heterogeneity variance to aid
# estimation.
## End(Not run)
[Package multinma version 0.7.1 Index]