Generalized linear mixed models (GLMM) combine the ideas of generalized linear

models with the random effects modeling ideas of the previous two chapters. The

response is a random variable, Yi, taking observed values, yi, for i = 1, . . . ,n, and follows an exponential family distribution as defined in Chapter 6:

f (yi|θi,φ) = exp [ yiθi−b(θi)

a(φ) + c(y,φ)

] Let EYi = µi and let this be connected to the linear predictor ηi using the link function g by ηi = g(µi). Suppose for simplicity that we use the canonical link for g so that we may make the direct connection that θi = µi. Now let the random effects, γ, have distribution h(γ|V ) for parametersV . The fixed

effects are β. Conditional on the random effects, γ:

θi = x T i β+ z

where xi and zi are the corresponding rows from the design matrices, X and Z, for

the respective fixed and random effects. Now the likelihood may be written as:

L(β,φ,V |y) = n

∫ f (yi|β,φ,γ)h(γ|V )dγ

Typically the random effects are assumed normal: γ ∼ N(0,D). However, unless f is also normal, the integral remains in the likelihood, which becomes difficult to

compute, particularly if the random effects structure is complicated.