nmbf01 | R Documentation |
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)
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 |
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
.
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)
Samuel Pawel
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. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.