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.
nmbf01(estimate, se, null = 0, psd, log = FALSE)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)
Parameter estimate
Standard error of the parameter estimate
Parameter value under the point null hypothesis. Defaults to
0
Spread of the normal moment prior assigned to the parameter under the alternative. The modes of the prior are located at \(\pm\sqrt{2}\,\code{psd}\)
Logical indicating whether the natural logarithm of the Bayes
factor should be returned. Defaults to FALSE
Samuel Pawel
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\).
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. tools:::Rd_expr_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. tools:::Rd_expr_doi("10.1037/met0000482")
nmbf01, pnmbf01, nnmbf01, powernmbf01
nmbf01(estimate = 0.25, se = 0.05, null = 0, psd = 0.5/sqrt(2)) # mode at 0.5
Run the code above in your browser using DataLab