bdm {fbst} | R Documentation |
bdm
Description
Calculates the Bayesian discrepancy measure for a precise null hypothesis.
Usage
bdm(posteriorDensityDraws, nullHypothesisValue=0)
Arguments
posteriorDensityDraws |
Vector of (MCMC) posterior parameter draws. |
nullHypothesisValue |
Parameter value of the precise null hypothesis. Defaults to zero. |
Details
The BDM is calculated as where
if
,
if
and
if
, where
denotes the posterior median of the parameter
, and the null hypothesis specifies
.
Value
Returns the value of the BDM.
Author(s)
Riko Kelter
References
For details, see: https://arxiv.org/abs/2105.13716
Examples
set.seed(57)
grp1=rnorm(50,0,1.5)
grp2=rnorm(50,0.8,3.2)
p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2,
posterior = TRUE, iterations = 3000,
rscale = "medium")[,4])
bdm(p,0)
[Package fbst version 2.2 Index]