R code for the questions:
A common approach for modelling enrolment to clinical trials is to use the PoissonGamma model. Under the model it
is assumed that the number of patients enrolled in each hospital participating in the trial follows the Poisson-Gamma distribution. The following data have been observedacross 100 hospitals:
3 10 7 1 4 3 5 6 4 1 2 1 1 3 3 2 3 6 7 10 2 6 9 7 5 1 9 5 7
13 1 1 2 2 3 1 1 4 11 2 6 8 20 3 1 2 2 4 2 7 2 2 6 3 1 2 5
13 3 4 1 1 1 9 6 5 3 6 9 1 3 4 4 13 5 8 2 2 8 9 3 10 15 8 2
7 10 4 1 5 10 1 8 3 2 3 4 7 1 5
1. Can the data be assumed to be independent and identically distributed? [3
marks]
2. Examine the sample mean and sample variance. What does this suggest about
the potential count model for these data? [2 marks]
3. Fit the Poisson-Gamma model to the data using the method of moments (i.e.
estimate model parameters). [6 marks]
4. Fit the Poisson-Gamma model using maximum likelihood. Give 95% confidence
intervals for the model parameters. [8 marks]
It was noticed that only hospitals which enrolled at least 1 patient were included in
the data; that is, there are no records of hospitals with no patients.
5. Using the model fitted in Part 4 calculate the expected number of hospitals
with zero patients (in a sample of n = 100). What does your answer suggest?
[3 marks]