bf01 {bfpwr} | R Documentation |
z-test 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 prior assigned to the parameter under the alternative. The standard error is assumed to be known.
Usage
bf01(estimate, se, null = 0, pm, psd, log = FALSE)
Arguments
estimate |
Parameter estimate |
se |
Standard error of the parameter estimate |
null |
Parameter value under the point null hypothesis. Defaults to
|
pm |
Mean of the normal prior assigned to the parameter under the alternative |
psd |
Standard deviation of the normal prior assigned to the parameter
under the alternative. Set to |
log |
Logical indicating whether the natural logarithm of the Bayes
factor should be returned. Defaults to |
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
Examples
bf01(estimate = 0.2, se = 0.05, null = 0, pm = 0, psd = 2)