ptbf01 | R Documentation |
This function computes the probability of obtaining a
t
-test Bayes factor (tbf01) more extreme than a threshold
k
with a specified sample size.
ptbf01(
k,
n,
n1 = n,
n2 = n,
null = 0,
plocation = 0,
pscale = 1/sqrt(2),
pdf = 1,
dpm = plocation,
dpsd = pscale,
type = c("two.sample", "one.sample", "paired"),
alternative = c("two.sided", "less", "greater"),
lower.tail = TRUE,
drange = "adaptive",
...
)
k |
Bayes factor threshold |
n |
Sample size (per group) |
n1 |
Sample size in group 1 (only required for two-sample |
n2 |
Sample size in group 2 (only required for two-sample |
null |
Standardized mean difference under the point null hypothesis.
Defaults to |
plocation |
|
pscale |
|
pdf |
|
dpm |
Mean of the normal design prior assigned to the standardized mean difference. Defaults to the analysis prior location |
dpsd |
Standard deviation of the normal design prior assigned to the
standardized mean difference. Set to |
type |
Type of |
alternative |
Direction of the test. Can be either |
lower.tail |
Logical indicating whether Pr( |
drange |
Standardized mean difference search range over which the
critical values are searched for. Can be either set to a numerical range
or to |
... |
Other arguments passed to |
The probability that the Bayes factor is less or greater (depending
on the specified lower.tail
) than the specified threshold k
Samuel Pawel
tbf01, ntbf01, powertbf01
## example from Schönbrodt and Wagenmakers (2018, p. 135)
ptbf01(k = 1/6, n = 146, dpm = 0.5, dpsd = 0, alternative = "greater")
ptbf01(k = 6, n = 146, dpm = 0, dpsd = 0, alternative = "greater",
lower.tail = FALSE)
## two-sided
ptbf01(k = 1/6, n = 146, dpm = 0.5, dpsd = 0)
ptbf01(k = 6, n = 146, dpm = 0, dpsd = 0, lower.tail = FALSE)
## one-sample test
ptbf01(k = 1/6, n = 146, dpm = 0.5, dpsd = 0, alternative = "greater", type = "one.sample")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.