powertbf01 | R Documentation |
t
-test Bayes factorCompute probability that t
-test Bayes factor is smaller
than a specified threshold (the power), or determine sample size to
obtain a target power.
powertbf01(
n = NULL,
power = NULL,
k = 1/10,
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,
nrange = c(2, 10^4)
)
n |
Sample size (per group) |
power |
Target power. Has to be |
k |
Bayes factor threshold. Defaults to |
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 |
nrange |
Sample size search range over which numerical search is
performed (only taken into account when |
This function provides a similar interface as
stats::power.t.test
. For some users, the low-level functions
ntbf01 (to directly compute the sample size for a fixed power) and
ptbf01 (to directly compute the power for a fixed sample size) may
also be useful.
Object of class "power.bftest"
, a list of the arguments
(including the computed one) augmented with method
and note
elements
Samuel Pawel
plot.power.bftest, ptbf01, ntbf01, tbf01
## determine power
powertbf01(n = 146, k = 1/6, dpm = 0.5, dps = 0, alternative = "greater")
## determine sample size
powertbf01(power = 0.95, k = 1/6, dpm = 0.5, dps = 0, alternative = "greater")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.