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 δH(x):=2P(θIH(x)x)\delta_H(x):=2\cdot P(\theta \in I_H(x)|x) where IH(x):=(m,θ0)I_H(x):=(m,\theta_0) if m<θ0m<\theta_0, IH(x):={m}I_H(x):=\{m\} if m=θ0m=\theta_0 and IH(x):=(θ0,m)I_H(x):=(\theta_0,m) if m>θ0m>\theta_0, where mm denotes the posterior median of the parameter θ\theta, and the null hypothesis specifies H0:θ=θ0H_0:\theta=\theta_0.

Value

Returns the value δH(x)\delta_H(x) 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]