Referring to Example 7.16:
a. Verify the likelihood function and the Gibbs sampler.
b. Write R code to reproduce Figure 7.13.
c. The truncated Poisson variable can be generated using the while statement
For 360 consecutive time units, consider recording the number of passages of individuals per unit time past some sensor. This can be, for instance, the number of cars observed at a crossroad. Hypothetical results are
The data involves a grouping of the observations with four passages or more. This can be addressed as a missing-data model, where we assume that the ungrouped observations are Xi ∼ P(λ). The likelihood of the model is