multinma (version 0.1.3)

summary.stan_nma: Posterior summaries from stan_nma objects

Description

Posterior summaries of model parameters in stan_nma objects may be produced using the summary() method and plotted with the plot() method. NOTE: To produce relative effects, absolute predictions, or posterior ranks, see relative_effects(), predict.stan_nma(), posterior_ranks(), posterior_rank_probs().

Usage

# S3 method for stan_nma
summary(object, ..., pars, include, probs = c(0.025, 0.25, 0.5, 0.75, 0.975))

# S3 method for stan_nma plot( x, ..., pars, include, stat = "pointinterval", orientation = c("horizontal", "vertical", "y", "x"), ref_line = NA_real_ )

Arguments

...

Additional arguments passed on to other methods

pars, include
probs

Numeric vector of specifying quantiles of interest, default c(0.025, 0.25, 0.5, 0.75, 0.975)

x, object

A stan_nma object

stat

Character string specifying the ggdist plot stat to use, default "pointinterval"

orientation

Whether the ggdist geom is drawn horizontally ("horizontal") or vertically ("vertical"), default "horizontal"

ref_line

Numeric vector of positions for reference lines, by default no reference lines are drawn

summary

Logical, calculate posterior summaries? Default TRUE.

Value

A nma_summary object

Details

The plot() method is a shortcut for plot(summary(stan_nma)). For details of plotting options, see plot.nma_summary().

See Also

plot.nma_summary(), relative_effects(), predict.stan_nma(), posterior_ranks(), posterior_rank_probs()

Examples

Run this code
# NOT RUN {
## Smoking cessation
# Set up network of smoking cessation data
head(smoking)

smk_net <- set_agd_arm(smoking,
                       study = studyn,
                       trt = trtc,
                       r = r,
                       n = n,
                       trt_ref = "No intervention")

# Print details
smk_net

# }
# NOT RUN {
# Fitting a random effects model
smk_fit_RE <- nma(smk_net,
                  trt_effects = "random",
                  prior_intercept = normal(scale = 100),
                  prior_trt = normal(scale = 100),
                  prior_het = normal(scale = 5))

smk_fit_RE
# }
# NOT RUN {
# }
# NOT RUN {
# Summary and plot of all model parameters
summary(smk_fit_RE)
plot(smk_fit_RE)

# Summary and plot of heterogeneity tau only
summary(smk_fit_RE, pars = "tau")
plot(smk_fit_RE, pars = "tau")

# Customising plot output
plot(smk_fit_RE,
     pars = c("d", "tau"),
     stat = "halfeye",
     ref_line = 0)
# }

Run the code above in your browser using DataLab