bsummary | R Documentation |
Returns a summary of a posterior distribution for a single
parameter / value. It is based on personal preference. Notably, it does not
only use bayestestR::describe_posterior
, an excellent function,
because of the desire to also describe the percentage of the full posterior
distribution that is at or exceeding the value of a
Minimally Important Difference (MID). MIDs are used in clinical studies with outcome
measures where there are pre-defined differences that are considered clinically
important, which is distinct from the ROPE or general credible intervals capturing
uncertainty.
bsummary(x, CI = 0.99, CIType = "HDI", ROPE = NULL, MID = NULL)
x |
The posterior distribution of a parameter |
CI |
A numeric value indicating the desired width of the credible interval.
Defaults to |
CIType |
A character string indicating the type of credible interval, passed on
to the |
ROPE |
Either left as |
MID |
Either left as |
A data.table
with the mean, M
the mean of the posterior samples
the median of the posterior samples
the lower limit of the credible interval
the upper limit of the credible interval
the percentage of posterior samples falling into the ROPE
the percentage of posterior samples falling at or beyond the MID
the width of the credible interval used
the type of credible interval used (e.g., highest density interval)
a label describing the values included in the ROPE
a label describing the values included in the MID
Kruschke, J. K. (2018). doi: 10.1177/2515245918771304 “Rejecting or accepting parameter values in Bayesian estimation”
bsummary(rnorm(1000)) bsummary(rnorm(1000), ROPE = c(-.5, .5), MID = c(-1, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.