## EXAMPLE 1:
## A pharmaceutical company tests a new blood pressure medication against a
## placebo in a clinical trial with 200 patients. At the start of the trial
## the researchers are moderately optimistic. Previous research on similar
## compounds suggests the drug probably works, but there's real uncertainty.
## They set their prior probability that H1 (the drug is effective) is true
## at 0.60.
## The trial finds a statistically significant reduction in blood pressure
## in the treatment group, with a p-value of 0.04.
epi.mbf(H0 = 0.40, class = "prior", p = 0.04, method = "goodman",
two.sided = TRUE)
## The calculated minimum Bayes factor is 0.121. With a prior estimate of the
## probability that H1 is true of 0.6 the data provide at most a posterior
## probability of 0.925 in favour of H1.
## Repeat these calculations using the Sellke, Bayarri and Berger method:
epi.mbf(H0 = 0.40, class = "prior", p = 0.04, method = "sellke",
two.sided = TRUE)
## The calculated minimum Bayes factor is 0.350. With a prior estimate of the
## probability that H1 is true of 0.6 the data provide at most a posterior
## probability of 0.811 in favour of H1.
Run the code above in your browser using DataLab