ntbf01 | R Documentation |
t
-test Bayes factorThis function computes the required sample size to obtain a
t
-test Bayes factor (tbf01) more extreme than a threshold
k
with a specified target power.
ntbf01(
k,
power,
null = 0,
plocation = 0,
pscale = 1/sqrt(2),
pdf = 1,
type = c("two.sample", "one.sample", "paired"),
alternative = c("two.sided", "less", "greater"),
dpm = plocation,
dpsd = pscale,
lower.tail = TRUE,
integer = TRUE,
nrange = c(2, 10^4),
...
)
k |
Bayes factor threshold |
power |
Target power |
null |
Standardized mean difference under the point null hypothesis.
Defaults to |
plocation |
|
pscale |
|
pdf |
|
type |
Type of |
alternative |
Direction of the test. Can be either |
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 |
lower.tail |
Logical indicating whether Pr( |
integer |
Logical indicating whether only integer valued sample sizes
should be returned. If |
nrange |
Sample size search range over which numerical search is
performed. Defaults to |
... |
Other arguments passed to |
The required sample size to achieve the specified power
Samuel Pawel
ptbf01, powertbf01, tbf01
## example from Schönbrodt and Wagenmakers (2018, p.135)
ntbf01(k = 1/6, power = 0.95, dpm = 0.5, dpsd = 0, alternative = "greater")
ntbf01(k = 1/6, power = 0.95, dpm = 0.5, dpsd = 0.1, alternative = "greater")
ntbf01(k = 6, power = 0.95, dpm = 0, dpsd = 0, alternative = "greater",
lower.tail = FALSE, nrange = c(2, 10000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.