nmbf01 {bfpwr} | R Documentation |
Normal moment prior Bayes factor
Description
This function computes the Bayes factor that quantifies the evidence that the data (in the form of an asymptotically normally distributed parameter estimate with standard error) provide for a point null hypothesis with a normal moment prior assigned to the parameter under the alternative.
Usage
nmbf01(estimate, se, null = 0, psd, log = FALSE)
Arguments
estimate |
Parameter estimate |
se |
Standard error of the parameter estimate |
null |
Parameter value under the point null hypothesis. Defaults to
|
psd |
Spread of the normal moment prior assigned to the parameter under
the alternative. The modes of the prior are located at
|
log |
Logical indicating whether the natural logarithm of the Bayes
factor should be returned. Defaults to |
Details
A normal moment prior has density f(x \mid \code{null},
\code{psd}) = N(x \mid \code{null}, \code{psd}^2) \times (x -
\code{null})/ \code{psd}^2
with
N(x \mid m, v)
the normal density with mean m
and
variance v
evaluated at x
.
Value
Bayes factor in favor of the null hypothesis over the alternative
(\text{BF}_{01}
> 1 indicates evidence for the null
hypothesis, whereas \text{BF}_{01}
< 1 indicates evidence for
the alternative)
Author(s)
Samuel Pawel
References
Johnson, V. E. and Rossell, D. (2010). On the use of non-local prior densities in Bayesian hypothesis tests. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(2):143–170. doi:10.1111/j.1467-9868.2009.00730.x
Pramanik, S. and Johnson, V. E. (2024). Efficient alternatives for Bayesian hypothesis tests in psychology. Psychological Methods, 29(2):243–261. doi:10.1037/met0000482
See Also
nmbf01, pnmbf01, nnmbf01, powernmbf01
Examples
nmbf01(estimate = 0.25, se = 0.05, null = 0, psd = 0.5/sqrt(2)) # mode at 0.5