The generalized linear model is widely applicable for studying outcomes of many types, including dichotomies, counts, polytomies, and continuous outcomes (McCullagh and Nelder, 1989). In conventional applications, a monotonic function of the mean known as a

“link function” is regarded as a linear combination of known explanatory variables; conditional on these, outcomes are assumed statistically independent. However, in many interesting applications, this independence assumption is untenable. For example, in a crosssectional study of students nested within schools, one can generally assume that children attending the same school are more similar than are children attending different schools. And in longitudinal studies, the focus of this chapter, outcomes collected on the same subject must generally be regarded as correlated.