hpd.summary | R Documentation |
This function computes point estimates and HPD intervals for each
factor combination in object@emmGrid
. While this function
may be called independently, it is called automatically by the S3 method
summary.emmGrid
when the object is based on a Bayesian model.
(Note: the level
argument, or its default, is passed as prob
).
hpd.summary(object, prob, by, type, point.est = median, delta,
bias.adjust = get_emm_option("back.bias.adj"), sigma, ...)
object |
an |
prob |
numeric probability content for HPD intervals (note: when not specified,
the current |
by |
factors to use as |
type |
prediction type as in |
point.est |
function to use to compute the point estimates from the posterior sample for each grid point |
delta |
Numeric equivalence threshold (on the linear predictor scale
regardless of |
bias.adjust |
Logical value for whether to adjust for bias in
back-transforming ( |
sigma |
Error SD assumed for bias correction (when
|
... |
required but not used |
an object of class summary_emm
If delta
is positive, two columns labeled p.equiv
and
odds.eq
are appended to the summary. p.equiv
is the fraction
of posterior estimates having absolute values less than delta
. The
odds.eq
column is just p.equiv
converted to an odds ratio; so
it is the posterior odds of equivalence.
A high value of p.equiv
is evidence
in favor of equivalence. It can be used to obtain something equivalent
(in spirit) to the frequentist Schuirmann (TOST) procedure, whereby we would
conclude equivalence at significance level \alpha
if the (1 - 2\alpha)
confidence interval falls entirely in the interval [-\delta, \delta]
.
Similarly in the Bayesian context, an equally strong argument for
equivalence is obtained if p.equiv
exceeds 1 - 2\alpha
.
A closely related quantity is the ROPE (region of practical equivalence),
obtainable via bayestestR::rope(object, range = c(-delta, delta))
.
Its value is approximately 100 * p.equiv / 0.95
if the default
ci = 0.95
is used. See also bayestestR's
issue #567.
Finally, a Bayes factor for equivalence is obtainable by dividing
odds.eq
by the prior odds of equivalence, assessed or elicited separately.
summary.emmGrid
if(require("coda"))
emm_example("hpd.summary-coda")
# Use emm_example("hpd.summary-coda", list = TRUE) # to see just the code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.