BFr {BayesRep} | R Documentation |
Generalized replication Bayes factor
Description
Computes the generalized replication Bayes factor
Usage
BFr(
to,
so,
tr,
sr,
ss = 0,
truncate = FALSE,
log = FALSE,
zo = NULL,
zr = NULL,
c = NULL,
g = 0
)
Arguments
to |
Original effect estimate |
so |
Standard error of the original effect estimate |
tr |
Replication effect estimate |
sr |
Standard error of the replication effect estimate |
ss |
Standard devation of the sceptical prior under
|
truncate |
Logical indicating whether advocacy prior should be truncated
to direction of the original effect estimate (i.e., a one-sided test).
Defaults to |
log |
Logical indicating whether the natural logarithm of the Bayes
factor should be returned. Defaults to |
zo |
Original z-value |
zr |
Replication z-value |
c |
Relative variance |
g |
Relative prior variance |
Details
The generalized replication Bayes factor is the Bayes factor contrasting the sceptic's hypothesis that the effect size is about zero
to the advocate's hypothesis that the effect size is compatible with its posterior distribution based on the original study and a uniform prior
The
standard replication Bayes factor from Verhagen and Wagenmakers (2014) is
obtained by specifying a point-null hypothesis ss = 0
(the
default).
The function can be used with two input parametrizations, either on the
absolute effect scale (to
, so
, tr
, sr
, ss
)
or alternatively on the relative z-scale (zo
, zr
, c
,
g
). If an argument on the effect scale is missing, the z-scale is
automatically used and the other non-missing arguments on the effect scale
ignored.
Value
The generalized replication Bayes factor
.
indicates that the data favour the advocate's hypothesis
(replication success), whereas
indicates that the data
favour the sceptic's hypothesis
(replication
failure).
Author(s)
Samuel Pawel
References
Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. doi:10.1037/a0036731
Ly, A., Etz, A., Marsman, M., Wagenmakers, E. J. (2019). Replication Bayes factors from evidence updating. Behavior Research Methods, 51(6):2498-2508. doi:10.3758/s13428-018-1092-x
Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491
See Also
Examples
to <- 2
tr <- 2.5
so <- 1
sr <- 1
BFr(to = to, so = so, tr = tr, sr = sr)
BFr(zo = to/so, zr = tr/sr, c = so^2/sr^2)