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 H_\mathrm{S}. Defaults to 0

truncate

Logical indicating whether advocacy prior should be truncated to direction of the original effect estimate (i.e., a one-sided test). Defaults to FALSE

log

Logical indicating whether the natural logarithm of the Bayes factor should be returned. Defaults to FALSE

zo

Original z-value zo = to/so (alternative parametrization for to and so)

zr

Replication z-value zr = tr/sr (alternative parametrization for tr and sr)

c

Relative variance c = so^2/sr^2 (alternative parametrization for so and sr)

g

Relative prior variance g = ss^2/so^2. Defaults to 0 (alternative parametrization for ss)

Details

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.

Value

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).

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

BFrSMD, BFrlogOR

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)

 

[Package BayesRep version 0.42.2 Index]