# NOT RUN {
# Calibration of a typical "threshold" p-value:
bcal(.05)
# Calibration of typical "threshold" p-values:
bcal(c(.1, .05, .01, .005, .001))
# Application: chi-squared goodness-of-fit test,
# lower bound on the Bayes factor in favor of the null hypothesis:
x <- matrix(c(12, 41, 25, 33), ncol = 2)
bcal(chisq.test(x)[["p.value"]])
# }
Run the code above in your browser using DataLab