1

A random sample of 300 women aged 60–69 years whose immediate families have had histories of cancer are to be screened for breast cancer. Let $y_i$ be 1 if woman i has a positive test, and 0 if not, for i = 1, . . . , 300. Let $\theta$ be the probability that a randomly selected woman aged 60–69 years with a family history of cancer has a positive breast cancer screening. Then an appropriate model for the data is to assume that the yi independently follow a Bernoulli distribution with probability $\theta$, that is, $p(y_i | \theta) = \theta^{y_i}(1 − \theta)^{1−yi}$ for i = 1, . . . , 300

Assuming our prior belief is that $\theta=0.036$ and I wish to use $Beta(a,b)$ as prior distribution. How could I determine $a$ and $b$ and why? Is there any way to do so in R?

Günal
  • 819
  • 3
  • 10
  • 21

1 Answers1

4

If your prior belief is that $\theta$ is exactly 0.036, then there is no point in using Beta distribution - use this value. However, I imagine that your prior belief is that $\theta$ is approximately this value. The question is however, how much informative do you want your Beta distribution to be? Do you want it to be sharply peaked at 0.036 (very informative) or very flat but slightly centered at this value? Choosing sharply peaked distribution would lead you to very informative prior, while using flat distribution to weakly informative prior. Asymmetric distribution leads to informative prior that "points" in some direction, i.e. says that you assume that the values are "rather higher" or "rather lower" then some value. If you answer yourself those questions it would be easier to pick the values for $a$ and $b$ parameters.

Consider that mean for Beta distribution is:

$$\frac{a}{a+b}$$

so you have to choose any values for $a$ and $b$ that give $a / (a+b) = 0.036$. There are multiple such values so it is a matter of your subjective choice.

What you can find helpful is this toy function that lets you play with the parameters and see how does the distribution change (it needs RStudio and manipulate library):

library(manipulate)
x <- seq(0, 1, by=0.01)

manipulate(
{ ci <- qbeta(c(0.05, .5, 0.95), alpha, beta)
  plot(x, dbeta(x, alpha, beta),
       col="blue", lwd=2, type="l", las=1, bty="n",
       ylab="density", xlab="", ylim=c(0, 5.5),
       main="Beta distribution")
  box()
  mtext(paste(c("95% CI:", round(ci, 2)),
              collapse=" "), cex=0.8, side=3)
  if (printci) abline(v=ci, lty=c(3,2,3))
},
alpha=slider(0.001, 10, step=0.001, initial=1),
beta=slider(0.001, 10, step=0.001, initial=1),
printci=checkbox(TRUE, "Show 95% CI"))

It is limited since it has fixed boundaries for $a$ and $b$ (you can change them), but should give you the feeling on how does Beta parameters relate to each other.

Spiegelhalter (2004) (or his book) gives nice examples of using priors for testing different hypothesis about the data.

Tim
  • 108,699
  • 20
  • 212
  • 390
  • thanks for the clear explanation. I pasted the code to R (not RStudio) and it produced this error: FUN("rs_createUUID"[[1L]], ...) : no such symbol rs_createUUID". Any idea why? – Günal Dec 18 '14 at 07:50
  • OK, I will install RStudio and retry – Günal Dec 18 '14 at 07:53
  • the code perfectly works. I guess I need to decide by the shape of the distribution. I am wondering which shape is best? – Günal Dec 18 '14 at 08:03
  • Just a note that a continuous prior being flat has nothing to do with its informativeness. Any flat continuous prior can be made into a peaked one by a nonlinear transformation of the sample space. Its the Jeffreys prior that is maximally noninformative. This prior is flat for location parameters, but not scale parameters. The Jeffreys prior of a Bernoulli probability is $\textrm{Beta}(\frac12, \frac12)$ — not a uniform distribution. – Neil G Dec 18 '14 at 15:39
  • And because of that I've written rather on weakly informative priors than noninformative. Also OP asked about informative ones. – Tim Dec 18 '14 at 16:32