Computes the generalized replication Bayes factor
BFr(
to,
so,
tr,
sr,
ss = 0,
truncate = FALSE,
log = FALSE,
zo = NULL,
zr = NULL,
c = NULL,
g = 0
)The generalized replication Bayes factor \(\mathrm{BF}_{\mathrm{SA}}\). \(\mathrm{BF}_{\mathrm{SA}} < 1\) indicates that the data favour the advocate's hypothesis \(H_{\mathrm{A}}\) (replication success), whereas \(\mathrm{BF}_{\mathrm{SA}} > 1\) indicates that the data favour the sceptic's hypothesis \(H_{\mathrm{S}}\) (replication failure).
Original effect estimate
Standard error of the original effect estimate
Replication effect estimate
Standard error of the replication effect estimate
Standard devation of the sceptical prior under
\(H_\mathrm{S}\). Defaults to 0
Logical indicating whether advocacy prior should be truncated
to direction of the original effect estimate (i.e., a one-sided test).
Defaults to FALSE
Logical indicating whether the natural logarithm of the Bayes
factor should be returned. Defaults to FALSE
Original z-value zo = to/so (alternative
parametrization for to and so)
Replication z-value zr = tr/sr (alternative
parametrization for tr and sr)
Relative variance c = so^2/sr^2 (alternative parametrization
for so and sr)
Relative prior variance g = ss^2/so^2. Defaults to 0
(alternative parametrization for ss)
Samuel Pawel
The generalized replication Bayes factor is the Bayes factor
contrasting the sceptic's hypothesis that the effect size is about zero
$$H_{\mathrm{S}}: \theta \sim \mathrm{N}(0, \code{ss}^2)$$ to the advocate's hypothesis that the effect size is
compatible with its posterior distribution based on the original study
and a uniform prior $$H_{\mathrm{A}}: \theta \sim f(\theta \, | \,
\mathrm{original~study}).$$ 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.
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. tools:::Rd_expr_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. tools:::Rd_expr_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. tools:::Rd_expr_doi("10.1111/rssb.12491")
BFrSMD, BFrlogOR
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)
Run the code above in your browser using DataLab