202. Generalized Linear Models

Three components:

  1. Random Component

Specifies the distribution of the response variable 𝑌.

𝑌 can come from the exponential family of distributions (which includes Normal, Binomial, Poisson, Gamma, etc.)

  1. Systematic Component

Specifies the linear predictor, a linear combination of explanatory variables:

𝜂=𝛽0+𝛽1𝑥1+𝛽2𝑥2++𝛽𝑝𝑥𝑝
  1. Link Function

Connects the expected value of 𝑌, denoted 𝜇=𝐸[𝑌], to the linear predictor 𝜂:

𝑔(𝜇)𝜂

Where 𝑔() is called the link function

ModelResponse
Type
DistributionLink
Function
Linear
Regression
ContinuousNormal𝑔(𝜇)=𝜇
(identity)
Logistic
Regression
Binary
(0, 1)
Binomial𝑔(𝜇)=log(𝜇1𝜇)
(logit)
Poisson
Regression
CountPoisson𝑔(𝜇)=log(𝜇)
Gamma
Regression
Positive
continuous
Gamma𝑔(𝜇)=log(𝜇)
Example

Logistic Regression

xy
10
20
30
41
51
61

Fit linear model

𝜂=𝛽0+𝛽1𝑥𝛽0=−0.4𝛽1=0.257

Logit link function:

𝑔(𝑝)=log𝑝1𝑝=𝜂

Model

log𝑝1𝑝=𝛽0+𝛽1𝑥

Equivalently

𝑝=11+𝑒(𝛽0+𝑏1𝑥)