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()
.
Arguments
- ...
Additional arguments passed on to other methods
- pars, include
See
rstan::extract()
- 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()
.
Examples
## Smoking cessation
# \donttest{
# Run smoking RE NMA example if not already available
if (!exists("smk_fit_RE")) example("example_smk_re", run.donttest = TRUE)
# }
# \donttest{
# Summary and plot of all model parameters
summary(smk_fit_RE)
#> mean sd 2.5% 25% 50% 75% 97.5%
#> mu[1] -2.79 0.33 -3.50 -3.00 -2.78 -2.56 -2.19
#> mu[2] -2.57 0.76 -4.14 -3.06 -2.57 -2.08 -1.05
#> mu[3] -2.14 0.12 -2.39 -2.22 -2.14 -2.06 -1.91
#> mu[4] -4.05 0.57 -5.26 -4.41 -4.01 -3.66 -3.04
#> mu[5] -2.16 0.14 -2.44 -2.25 -2.15 -2.06 -1.89
#> mu[6] -3.44 0.74 -5.03 -3.89 -3.39 -2.93 -2.15
#> mu[7] -3.03 0.45 -4.00 -3.31 -2.99 -2.71 -2.25
#> mu[8] -2.71 0.60 -4.00 -3.07 -2.68 -2.28 -1.69
#> mu[9] -1.84 0.41 -2.67 -2.11 -1.82 -1.56 -1.10
#> mu[10] -2.08 0.12 -2.32 -2.16 -2.08 -2.00 -1.86
#> mu[11] -3.62 0.23 -4.10 -3.77 -3.62 -3.46 -3.18
#> mu[12] -2.22 0.13 -2.49 -2.31 -2.22 -2.13 -1.97
#> mu[13] -2.67 0.44 -3.59 -2.96 -2.65 -2.37 -1.88
#> mu[14] -2.41 0.23 -2.89 -2.56 -2.41 -2.25 -1.98
#> mu[15] -2.70 0.76 -4.41 -3.16 -2.64 -2.18 -1.41
#> mu[16] -2.61 0.34 -3.35 -2.83 -2.60 -2.38 -1.99
#> mu[17] -2.38 0.11 -2.59 -2.45 -2.38 -2.30 -2.18
#> mu[18] -2.57 0.27 -3.14 -2.74 -2.56 -2.38 -2.05
#> mu[19] -1.90 0.12 -2.15 -1.97 -1.89 -1.82 -1.67
#> mu[20] -2.80 0.12 -3.04 -2.88 -2.80 -2.72 -2.57
#> mu[21] -1.13 0.81 -2.77 -1.64 -1.12 -0.60 0.41
#> mu[22] -2.40 0.86 -4.13 -2.94 -2.37 -1.84 -0.73
#> mu[23] -2.31 0.83 -3.99 -2.84 -2.31 -1.76 -0.69
#> mu[24] -2.79 0.86 -4.45 -3.36 -2.79 -2.21 -1.14
#> d[Group counselling] 1.11 0.44 0.28 0.81 1.10 1.39 1.99
#> d[Individual counselling] 0.85 0.24 0.38 0.69 0.84 1.00 1.34
#> d[Self-help] 0.48 0.40 -0.29 0.23 0.48 0.74 1.24
#> tau 0.84 0.18 0.55 0.71 0.82 0.94 1.26
#> delta[1: Individual counselling] 1.08 0.39 0.33 0.82 1.07 1.33 1.88
#> delta[1: Group counselling] 0.38 0.42 -0.45 0.10 0.37 0.67 1.21
#> delta[2: Self-help] 0.67 0.79 -0.86 0.16 0.65 1.18 2.26
#> delta[2: Individual counselling] 0.76 0.77 -0.77 0.28 0.76 1.24 2.34
#> delta[2: Group counselling] 0.99 0.77 -0.56 0.50 1.00 1.47 2.56
#> delta[3: Individual counselling] 2.17 0.14 1.90 2.07 2.17 2.26 2.45
#> delta[4: Individual counselling] 0.91 0.59 -0.18 0.52 0.89 1.29 2.14
#> delta[5: Individual counselling] 0.44 0.16 0.13 0.33 0.43 0.54 0.75
#> delta[6: Individual counselling] 1.75 0.73 0.47 1.24 1.70 2.21 3.30
#> delta[7: Individual counselling] 2.15 0.49 1.29 1.81 2.12 2.45 3.18
#> delta[8: Individual counselling] 1.66 0.62 0.60 1.22 1.61 2.03 2.99
#> delta[9: Individual counselling] 0.59 0.45 -0.27 0.29 0.59 0.90 1.49
#> delta[10: Self-help] 0.00 0.16 -0.31 -0.11 0.00 0.11 0.33
#> delta[11: Self-help] 0.41 0.31 -0.21 0.19 0.41 0.62 1.01
#> delta[12: Individual counselling] 0.41 0.16 0.09 0.30 0.41 0.52 0.74
#> delta[13: Individual counselling] 0.38 0.49 -0.57 0.05 0.38 0.71 1.36
#> delta[14: Individual counselling] 0.63 0.29 0.07 0.44 0.62 0.82 1.22
#> delta[15: Group counselling] 2.15 0.79 0.75 1.60 2.11 2.63 3.90
#> delta[16: Self-help] 0.66 0.40 -0.10 0.39 0.65 0.92 1.48
#> delta[17: Individual counselling] 0.55 0.14 0.28 0.46 0.55 0.65 0.81
#> delta[18: Individual counselling] 0.03 0.31 -0.57 -0.19 0.02 0.23 0.64
#> delta[19: Individual counselling] -0.19 0.17 -0.51 -0.30 -0.19 -0.08 0.14
#> delta[20: Individual counselling] 0.08 0.18 -0.27 -0.05 0.08 0.20 0.42
#> delta[21: Self-help] 0.70 0.81 -0.83 0.16 0.68 1.22 2.36
#> delta[21: Individual counselling] 0.66 0.80 -0.94 0.14 0.65 1.17 2.25
#> delta[22: Self-help] 0.31 0.85 -1.38 -0.23 0.29 0.86 2.03
#> delta[22: Group counselling] 1.28 0.86 -0.37 0.72 1.25 1.81 3.02
#> delta[23: Individual counselling] 0.66 0.81 -0.91 0.14 0.64 1.18 2.27
#> delta[23: Group counselling] 1.27 0.83 -0.37 0.73 1.26 1.78 2.95
#> delta[24: Individual counselling] 1.03 0.82 -0.55 0.48 1.01 1.56 2.68
#> delta[24: Group counselling] 0.88 0.85 -0.75 0.32 0.87 1.43 2.58
#> Bulk_ESS Tail_ESS Rhat
#> mu[1] 5003 3082 1
#> mu[2] 2781 2596 1
#> mu[3] 7734 2393 1
#> mu[4] 3832 2586 1
#> mu[5] 8858 2612 1
#> mu[6] 3675 2769 1
#> mu[7] 4033 2673 1
#> mu[8] 3644 2633 1
#> mu[9] 4487 2960 1
#> mu[10] 9817 3071 1
#> mu[11] 6578 2799 1
#> mu[12] 7819 2793 1
#> mu[13] 4921 3014 1
#> mu[14] 6608 3029 1
#> mu[15] 3740 2685 1
#> mu[16] 6219 3013 1
#> mu[17] 8002 3309 1
#> mu[18] 4727 2897 1
#> mu[19] 7251 2631 1
#> mu[20] 7276 3281 1
#> mu[21] 3122 2788 1
#> mu[22] 2629 2496 1
#> mu[23] 3212 2805 1
#> mu[24] 3263 2717 1
#> d[Group counselling] 2276 2783 1
#> d[Individual counselling] 1454 2018 1
#> d[Self-help] 2017 2344 1
#> tau 1368 2250 1
#> delta[1: Individual counselling] 5147 3349 1
#> delta[1: Group counselling] 5223 3597 1
#> delta[2: Self-help] 2877 2653 1
#> delta[2: Individual counselling] 2856 2880 1
#> delta[2: Group counselling] 2863 2623 1
#> delta[3: Individual counselling] 5690 2911 1
#> delta[4: Individual counselling] 3701 2854 1
#> delta[5: Individual counselling] 7221 2955 1
#> delta[6: Individual counselling] 3276 2707 1
#> delta[7: Individual counselling] 3762 2562 1
#> delta[8: Individual counselling] 3365 2603 1
#> delta[9: Individual counselling] 3952 3131 1
#> delta[10: Self-help] 6163 3761 1
#> delta[11: Self-help] 5875 3273 1
#> delta[12: Individual counselling] 6289 3407 1
#> delta[13: Individual counselling] 4465 2947 1
#> delta[14: Individual counselling] 5646 2992 1
#> delta[15: Group counselling] 3316 2742 1
#> delta[16: Self-help] 5617 3071 1
#> delta[17: Individual counselling] 6375 3777 1
#> delta[18: Individual counselling] 4935 3131 1
#> delta[19: Individual counselling] 5607 3637 1
#> delta[20: Individual counselling] 5427 3634 1
#> delta[21: Self-help] 3074 2859 1
#> delta[21: Individual counselling] 3220 2811 1
#> delta[22: Self-help] 2727 2774 1
#> delta[22: Group counselling] 2542 2456 1
#> delta[23: Individual counselling] 3338 3084 1
#> delta[23: Group counselling] 3141 2894 1
#> delta[24: Individual counselling] 3530 3386 1
#> delta[24: Group counselling] 3316 2881 1
plot(smk_fit_RE)
# Summary and plot of heterogeneity tau only
summary(smk_fit_RE, pars = "tau")
#> mean sd 2.5% 25% 50% 75% 97.5% Bulk_ESS Tail_ESS Rhat
#> tau 0.84 0.18 0.55 0.71 0.82 0.94 1.26 1368 2250 1
plot(smk_fit_RE, pars = "tau")
# Customising plot output
plot(smk_fit_RE,
pars = c("d", "tau"),
stat = "halfeye",
ref_line = 0)
# }