pnmbf01 | R Documentation |
This function computes the probability of obtaining a normal
moment prior Bayes factor (nmbf01) more extreme than a threshold
k
with a specified sample size.
pnmbf01(k, n, usd, null = 0, psd, dpm, dpsd, lower.tail = TRUE)
k |
Bayes factor threshold |
n |
Sample size |
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 |
lower.tail |
Logical indicating whether Pr( |
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 probability that the Bayes factor is less or greater (depending
on the specified lower.tail
) than the specified threshold k
Samuel Pawel
nmbf01, nnmbf01, powernmbf01
## point desing prior (psd = 0)
pnmbf01(k = 1/10, n = 200, usd = 2, null = 0, psd = 0.5/sqrt(2), dpm = 0.5, dpsd = 0)
## normal design prior to incorporate parameter uncertainty (psd > 0)
pnmbf01(k = 1/10, n = 200, usd = 2, null = 0, psd = 0.5/sqrt(2), dpm = 0.5, dpsd = 0.25)
## design prior is the null hypothesis (dpm = 0, dpsd = 0)
pnmbf01(k = 10, n = 200, usd = 2, null = 0, psd = 0.5/sqrt(2), dpm = 0, dpsd = 0,
lower.tail = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.