Generalized Linear Models

Overview

A generalized linear model (GLM) extends ordinary linear regression so that the outcome can be continuous, binary, count, or another exponential-family outcome.

Core idea

A GLM models the expected outcome through a link function applied to a linear predictor:

g(E[Yi])=ηi=α+β1Xi1+β2Xi2+

where g() is the link function and ηi is the linear predictor.

Three Components

  1. Random component: the outcome distribution, e.g. Normal, Bernoulli, Poisson.
  2. Systematic component: the linear predictor η=Xβ.
  3. Link function: maps the expected outcome to the linear predictor scale.

In other words, a GLM combines:

Common GLM Examples

Model Outcome type Distribution Link function Typical question
Linear regression (Regression#Linear Regression) Continuous Normal Identity How does Y change with X?
Logistic regression (Regression#Logistic Regression) Binary Bernoulli Logit How does X affect the probability of an event?
Poisson regression Count Poisson Log How does X affect an event rate or count?

Linear Regression as a GLM

YiNormal(μi,σ)μi=α+βXXi+βZZi

Logistic Regression as a GLM

YiBernoulli(pi)logit(pi)=log(pi1pi)=α+βXXi+βZZi

Poisson Regression as a GLM

YiPoisson(λi)log(λi)=α+βXXi+βZZi

Equivalently:

λi=exp(α+βXXi+βZZi)

Relationship to Other Models

Relationship to Mixed Models

GLMs assume that observations are independent unless the model is extended. This is where Linear Mixed Models and generalized mixed models become important.

GLM, LMM, and GLMM

  • GLM = generalized outcome distribution + link function, but usually independent observations.
  • LMM = linear/Normal outcome model + random effects for clustered or repeated data.
  • GLMM = GLM + random effects; useful for binary/count repeated-measures or clustered outcomes.

Example:

Relationship to GEE

Generalized estimating equations (GEE) extend the GLM idea to correlated observations, such as repeated measurements from the same patient in Longitudinal Data Analysis.

Feature GLM GEE
Data Independent observations Correlated or repeated observations
Target Covariate–outcome association Population-average association
Outcomes Continuous, binary, count, etc. Same outcome families via link functions
Correlation Usually assumes independence Specifies a working within-subject correlation
Interpretation Model-specific mean association Marginal / population-average association

GEE is closely related to GLMs, but it is not simply another GLM distribution. It is an estimation framework for correlated data.