nnmbf01 | R Documentation |
This function computes the required sample size to obtain a
normal moment prior Bayes factor (nbf01) more extreme than a
threshold k
with a specified target power.
nnmbf01(
k,
power,
usd,
null = 0,
psd,
dpm,
dpsd,
nrange = c(1, 10^5),
lower.tail = TRUE,
integer = TRUE,
...
)
k |
Bayes factor threshold |
power |
Target power |
usd |
Unit standard deviation, the (approximate) standard error of the
parameter estimate based on |
null |
Parameter value under the point null hypothesis. Defaults to
|
psd |
Spread of the normal moment prior assigned to the parameter under
the alternative in the analysis. The modes of the prior are located at
|
dpm |
Mean of the normal design prior assigned to the parameter |
dpsd |
Standard deviation of the normal design prior assigned to the parameter. Set to 0 to obtain a point prior at the design prior mean |
nrange |
Sample size search range over which numerical search is
performed. Defaults to |
lower.tail |
Logical indicating whether Pr( |
integer |
Logical indicating whether only integer valued sample sizes
should be returned. If |
... |
Other arguments passed to |
It is assumed that the standard error of the future parameter
estimate is of the form \code{se} =\code{usd}/\sqrt{\code{n}}
. For example, for normally distributed data with known
standard deviation sd
and two equally sized groups of size
n
, the standard error of an estimated standardized mean difference
is \code{se} = \code{sd}\sqrt{2/n}
, so the
corresponding unit standard deviation is \code{usd} =
\code{sd}\sqrt{2}
. See the vignette for more
information.
The required sample size to achieve the specified power
Samuel Pawel
nmbf01, pnmbf01, powernmbf01
nnmbf01(k = 1/10, power = 0.9, usd = 1, null = 0, psd = 0.5/sqrt(2), dpm = 0.5, dpsd = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.