The BGLIMM Procedure

Generalized Linear Mixed Models

First consider the simplest model: a normal linear model. The quantity of primary interest, y Subscript i, is called the response or outcome variable for the ith individual. The variable bold x Subscript i is the 1 times p covariate vector for the fixed effects. The distribution of y Subscript i given bold x Subscript i is normal with a mean that is a linear function of bold x Subscript i,

StartLayout 1st Row 1st Column y Subscript i Baseline equals 2nd Column bold x Subscript i Baseline bold-italic beta plus epsilon Subscript i Baseline comma i equals 1 comma ellipsis comma upper I 2nd Row 1st Column epsilon Subscript i Baseline tilde 2nd Column upper N left-parenthesis bold 0 comma sigma squared right-parenthesis EndLayout

where bold-italic beta is a p times 1 vector of regression coefficients (also known as fixed effects) and epsilon Subscript i is the noise with a variance sigma squared.

The normal linear model can be expanded to include random effects, and the model becomes a normal linear mixed model,

StartLayout 1st Row 1st Column y Subscript i Baseline equals 2nd Column bold x Subscript i Baseline bold-italic beta plus bold z Subscript i Baseline bold-italic gamma Subscript i plus epsilon Subscript i 2nd Row 1st Column bold-italic gamma Subscript i Baseline tilde 2nd Column upper N left-parenthesis bold 0 comma bold upper G Subscript i Baseline right-parenthesis 3rd Row 1st Column epsilon Subscript i Baseline tilde 2nd Column upper N left-parenthesis 0 comma sigma squared right-parenthesis EndLayout

where bold-italic gamma Subscript i is a q times 1 vector of random effects, bold z Subscript i is an 1 times q matrix of covariates for the bold-italic gamma Subscript i, and bold upper G Subscript i is the covariance matrix of the random effects bold-italic gamma Subscript i (bold upper G is a block diagonal matrix where each block is bold upper G Subscript i).

When an individual i has n Subscript i repeated measurements, the random-effects model for outcome vector bold y Subscript i is given by

bold y Subscript i Baseline equals bold upper X Subscript i Baseline bold-italic beta plus bold upper Z Subscript i Baseline bold-italic gamma Subscript i Baseline plus bold-italic epsilon Subscript i Baseline comma i equals 1 comma ellipsis comma upper I

where bold y Subscript i is n Subscript i Baseline times 1, bold upper X Subscript i is an n Subscript i Baseline times p matrix of fixed covariates, bold-italic beta is a p times 1 vector of regression coefficients (also known as fixed effects), bold-italic gamma Subscript i is a q times 1 vector of random effects, bold upper Z Subscript i is an n Subscript i Baseline times q matrix of covariates for the bold-italic gamma Subscript i, and bold-italic epsilon Subscript i is an n Subscript i Baseline times 1 vector of random errors.

It is further assumed that

StartLayout 1st Row 1st Column bold-italic gamma Subscript i Baseline tilde 2nd Column upper N left-parenthesis bold 0 comma bold upper G Subscript i Baseline right-parenthesis 2nd Row 1st Column bold-italic epsilon Subscript i Baseline tilde 2nd Column upper N left-parenthesis bold 0 comma bold upper R Subscript i Baseline right-parenthesis EndLayout

where bold upper G Subscript i is the covariance matrix of bold-italic gamma Subscript i (bold upper G is a block diagonal matrix where each block is bold upper G Subscript i) and bold upper R Subscript i is the covariance matrix of the residual errors for the ith subject (bold upper R is a block diagonal matrix where each block is bold upper R Subscript i).

There are cases where the relationship between the design matrix (bold upper X and bold upper Z) and the expectation of the response is not linear, or where the distribution for the response is far from normal, even after transformation of the data. The class of generalized linear mixed models unifies the approaches that you need in order to analyze data in those cases. Let bold y be the collection of all bold y Subscript i, and let bold upper X and bold upper Z be the collection of all bold upper X Subscript i and bold upper Z Subscript i, respectively. A generalized linear mixed model consists of the following:

  • the linear predictor bold-italic eta equals bold upper X bold-italic beta plus bold upper Z bold-italic gamma

  • the link function g left-parenthesis dot right-parenthesis that relates the linear predictor to the mean of the outcome via a monotone link function,

    normal upper E left-bracket upper Y vertical-bar bold-italic beta comma bold-italic gamma right-bracket equals g Superscript negative 1 Baseline left-parenthesis bold-italic eta right-parenthesis equals g Superscript negative 1 Baseline left-parenthesis bold upper X bold-italic beta plus bold upper Z bold-italic gamma right-parenthesis

    where g left-parenthesis dot right-parenthesis is a differentiable monotone link function and g Superscript negative 1 Baseline left-parenthesis dot right-parenthesis is its inverse.

  • a response distribution in the exponential family of distributions. The distribution can also depend on a scale parameter, phi.

A density or mass function in the exponential family can be written as

f left-parenthesis y right-parenthesis equals exp left-brace StartFraction y theta minus b left-parenthesis theta right-parenthesis Over phi EndFraction plus c left-parenthesis y comma f left-parenthesis phi right-parenthesis right-parenthesis right-brace

for some functions b left-parenthesis dot right-parenthesis and c left-parenthesis dot right-parenthesis. The parameter theta is called the natural (canonical) parameter. The parameter phi is a scale parameter, and it is not present in all exponential family distributions. For example, in logistic regression and Poisson regression, phi equals 1.

The mean and variance of the data are related to the components of the density, normal upper E left-bracket upper Y right-bracket equals mu equals b prime left-parenthesis theta right-parenthesis, normal upper V normal a normal r left-bracket upper Y right-bracket equals phi b double-prime left-parenthesis theta right-parenthesis, where primes denote first and second derivatives. If you express theta as a function of mu, the relationship is known as the natural link function or the canonical link function. In other words, modeling data by using a canonical link assumes that theta equals bold x bold-italic beta plus bold z bold-italic gamma; the effect contributions are additive on the canonical scale. The second derivative of b left-parenthesis dot right-parenthesis, expressed as a function of mu, is the variance function of the generalized linear model, a left-parenthesis mu right-parenthesis equals b double-prime left-parenthesis theta left-parenthesis mu right-parenthesis right-parenthesis. Note that because of this relationship, the distribution determines the variance function and the canonical link function. However, you cannot proceed in the opposite direction.

Likelihood-based inference is based on the marginal likelihood in which the random effects are integrated out. The integration requires numerical methods, such as Gaussian quadrature methods (which can be computationally costly) or Laplace methods (which are faster but not as accurate). The Bayesian approach estimates the joint distribution of all parameters in the model, and it is made possible by the Markov chain Monte Carlo (MCMC) methods. The presence of the random-effects parameters bold-italic gamma adds an extra sampling step to the Gibbs algorithm, thus eliminating the need to numerically integrate out bold-italic gamma to make inferences about bold-italic beta. The MCMC methods produce marginal distribution estimates of all fixed-effects parameters, include the bold upper G and bold upper R covariance matrices, making estimation convenient.

Last updated: December 09, 2022