A function to calculate the minimum Bayes factor using the Goodman (1999) or Sellke, Bayarri and Berger (2001) method.
Usage
Variable
Details
Hypothesis
Are you entering prior estimates for the Null or Alternative hypothesis (string, "Null", "Alternative").
My best estimate of the value of H is
Mode (most likely) value for the prior (numeric, min 0, max 1, default 0.50).
and, I'm X% confident
Level of confidence in the lower or upper bound of the prior as a percentage (numeric, min 0, max 100, default 0.40).
that H is
Bound of H (string, "Less than", "Greater than").
Bound
Value of the lower or upper bound of H (numeric, min 0, max 1, default 0.40).
Maximum shape1
Maximum of the shape1 parameter (numeric, min 0, max ∞, default 100).
Method
Which minimum Bayes factor method to use (string, "Goodman", "Sellke et al.").
Study p-value
P-value for the study of interest (numeric, min 0, max 1, default 0.10).
Level of confidence
Magnitude of confidence interval (integer, min 0, max 1, default 0.95).
Decimal places for output
Integer, minimum 0, maximum 8, default 3.
Details
A Bayes factor is a number that tells you how much a piece of evidence should shift your belief between two competing explanations such as: 'this treatment works' versus 'ths treatment doesn't work'.
The 'minimum' Bayes factor is the smallest possible shift in belief that a given piece of evidence (like a p-value from a study) could justify, even under the most generous assumptions favouring the surprising result. It is used to show that even seemingly strong evidence (such as a low p-value) often provides weaker support for a hypothesis than people intuitively assume, because it calculates the best-case scenario for that evidence and often still finds it underwhelming.
The Goodman (1999) method compares the null hypothesis to a single, specific alternative: The value of the parameter that best fits the data (the maximum likelihood estimate).
The Sellke, Bayarri and Berger (2001) method considers an entire class of reasonable prior distributions on the alternative hypothesis (essentially, any distribution that doesn't put special weight right at the null) and finds the minimum Bayes factor across that whole class.
The Sellke, Bayarri and Berger method is consistently more conservative (larger minimum Bayes factor estimates, i.e., weaker evidence against the null) than the Goodman method. This makes sense: the Goodman method is comparing against the single best-fitting alternative, which is the most favourable comparison possible. The Sellke-Bayarri-Berger method asks for the worst case across many reasonable alternatives, which can't be as extreme as cherry-picking the one alternative that happens to match the data perfectly.
References
Goodman S (1999) Toward evidence-based medical statistics. 1: The P value fallacy. Annals of Internal Medicine 130: 995 - 1004. DOI: 10.7326/0003-4819-130-12-199906150-00008.
Sellke T, Bayarri M, Berger J (2001) Calibration of p values for testing precise null hypotheses. American Statistician 55: 62 - 71.