Learn R Programming

BayesRep (version 0.42.2)

BFslogOR: Sceptical Bayes factor for logOR effect sizes

Description

Computes the sceptical Bayes factor for logOR effect sizes

Usage

BFslogOR(
  ao,
  bo,
  nTo = ao + bo,
  co,
  do,
  nCo = co + do,
  ar,
  br,
  nTr = ar + br,
  cr,
  dr,
  nCr = cr + dr,
  method = c("integration", "hypergeo")
)

Value

The sceptical Bayes factor \(\mathrm{BF}_{\mathrm{S}}\). \(\mathrm{BF}_{\mathrm{S}} < 1\) indicates replication success, the smaller the value of \(\mathrm{BF}_{\mathrm{S}}\)

the higher the degree of replication success. It is possible that the result of the replication is so inconclusive that replication success cannot be established at any level. In this case, the sceptical Bayes factor does not exist and the function returns NaN.

Arguments

ao

Number of cases in original study treatment group

bo

Number of non-cases in original study treatment group

nTo

Number of participants in original study treatment group (specify alternatively to b)

co

Number of cases in original study control group

do

Number of non-cases in original study control group

nCo

Number of participants in original study control group (specify alternatively to d)

ar

Number of cases in replication study treatment group

br

Number of non-cases in replication study treatment group

nTr

Number of participants in replication study treatment group (specify alternatively to b)

cr

Number of cases in replication study control group

dr

Number of non-cases in replication study control group

nCr

Number of participants in replication study control group (specify alternatively to d)

method

Method to compute posterior density. Either "integration" (default) or "hypergeo"

Author

Samuel Pawel

Details

This function computes the sceptical Bayes factor for log odds ratio (logOR) effect sizes using an exact binomial likelihood for the data instead of the normal approximation used in BFs (for details, see Section 4 in Pawel and Held, 2022).

References

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

See Also

BFs, BFslogOR

Examples

Run this code
data("SSRPexact")
balafoutas2012 <- subset(SSRPexact, study == "Balafoutas and Sutter (2012), Science")
with(balafoutas2012,
     BFslogOR(ao = ao, bo = bo, co = co, do = do, ar = ar, br = br, cr = cr, dr = dr))

Run the code above in your browser using DataLab