Blogs · Supervised Learning · Regression

Regression Models: GAM, GLM, and GLMM

A concise explanation of generalized linear models, generalized additive models, and generalized linear mixed models, with guidance on when to use each.

2019.05.30 · 1 min read · by Zhenlin Wang

Introduction

Linear regression is a starting point, but many real targets are not continuous normal variables with simple linear effects. GLM, GAM, and GLMM extend regression in different directions.

GLM: Generalized Linear Model

A generalized linear model connects features to the expected target through a link function.

It has three pieces:

Examples:

Use GLMs when the target distribution is not well modeled by ordinary linear regression.

GAM: Generalized Additive Model

A generalized additive model allows nonlinear feature effects while keeping the model additive:

$$ g(E[y]) = \beta_0 + f_1(x_1) + f_2(x_2) + \dots + f_p(x_p) $$

Each $f_i$ can be a smooth function.

Use GAMs when:

GAMs are a good middle ground between linear models and black-box models.

GLMM: Generalized Linear Mixed Model

A generalized linear mixed model adds random effects.

Use GLMMs when data has grouped structure:

Random effects help model variation between groups without fitting a completely separate model for each group.

Choosing Among Them

Use:

For pure predictive accuracy on tabular data, boosted trees may win. For inference and explainability, these regression families remain valuable.

Closing

GLM, GAM, and GLMM extend linear regression while preserving statistical structure. They are especially useful when you need both prediction and understanding.