ABSTRACT

This chapter provides an extended example of building and fitting a multilevel model for clustered data. It aims to simulate clustered data, to demonstrate the improved accuracy the approach delivers. Multilevel models are also mixtures. Compared to a beta-binomial or gamma-Poisson model, a binomial or Poisson model with a varying intercept on every observed outcome will often be easier to estimate and easier to extend. Steep changes in probability are hard for a discrete physics simulation to follow. The problem of making predictions for new clusters is really a problem of generalizing from the sample. A common problem is how to use a non-representative sample of a population to generate representative predictions for the same population.