bfPPalpha {ppRep} | R Documentation |
Bayes factor for testing power parameter
Description
This function computes the Bayes factor contrasting
H_1\colon \alpha = 1
to H_0\colon \alpha <
1
for the replication data assuming a normal likelihood.
The power parameter \alpha
indicates how much the normal
likelihood of the original data is raised to and then incorporated in the
prior for the effect size \theta
(e.g., for \alpha =
0
the original data are completely discounted). Under
H_0
, the power parameter can either be fixed to 0, or it can
have a beta distribution \alpha | H_0 \sim \mbox{Beta}(1,
\code{y})
. For the fixed power parameter
case, the specification of an unit-information prior \theta \sim
\mathrm{N}(0, \code{uv})
for the effect size
\theta
is required as the prior is otherwise not proper.
Usage
bfPPalpha(tr, sr, to, so, y = 2, uv = NA, ...)
Arguments
tr |
Effect estimate of the replication study. |
sr |
Standard error of the replication effect estimate. |
to |
Effect estimate of the original study. |
so |
Standard error of the replication effect estimate. |
y |
Number of failures parameter for beta prior of power parameter under
|
uv |
Variance of the unit-information prior for the effect size that is
used for testing the simple hypothesis |
... |
Additional arguments passed to |
Value
Bayes factor (BF > 1 indicates evidence for H_0
, whereas BF
< 1 indicates evidence for H_1
)
Author(s)
Samuel Pawel
See Also
Examples
## use unit variance of 2
bfPPalpha(tr = 0.09, sr = 0.0518, to = 0.205, so = 0.0506, uv = 2)
## use beta prior alpha|H1 ~ Be(1, y = 2)
bfPPalpha(tr = 0.09, sr = 0.0518, to = 0.205, so = 0.0506, y = 2)