Generalized Linear Models

Rivu Basu GLM Simulation Lab

Explore how the random component, linear predictor, and link function work together. Generate Gaussian, Binomial, and Poisson data, fit GLMs with IRLS, drag points, compare links, and read diagnostics in real time.

Offline single-file lab
IRLS fitting engine
Interactive diagnostics
Teaching mode + quiz
Family
Gaussian
Link
Identity
Sample
120
Status
Ready

Predictor vs Response

Observed Fitted Mean/Probability

Predicted vs Actual

Fit the model to see calibration.

Residual Plot

Choose raw or deviance residuals.

η and μ Side by Side

Inverse link maps the linear predictor back to the mean.

Compare Current Link with an Alternate Fit

This is especially useful for seeing why the canonical link often behaves better.

Generate data and fit the main model first, then compare with a second link on the same dataset.

Deviance
--
AIC
--
Mean Response
--
Residual Spread
--

Coefficient Table

Term Estimate Std. Error Z / t Interpretation
Fit a model to populate estimates.

What Is Happening?

Teaching mode is on.

Why a link function?

Variance pattern

Different GLM families change how variance grows with the mean response.

Coefficient meaning

Interpret slope coefficients on the link scale first, then map back to the response scale.

IRLS update

IRLS repeatedly solves a weighted least squares problem until the estimates stabilize.