Linear Models and Generalized Linear Models
Linear regression as geometry
Normal equations and projection
In the linear model with and , the least squares estimator minimizes and projects onto the column space of .
What does ordinary least squares minimize?
OLS minimizes .
Correct answer: Squared residual sum
What is the role of the design matrix ?
Each row corresponds to one observation and each column to a predictor or basis function.
Correct answer: It encodes predictors and determines the linear subspace used to fit the response.
Generalized linear models
GLMs extend linear modeling to non-Gaussian responses with exponential-family distributions. They use a link function to connect the mean to predictors.
Examples of GLMs
| Response model | Link function | Typical use |
|---|---|---|
| Binomial | Logit | Binary outcomes |
| Poisson | Log | Count data |
| Gaussian | Identity | Continuous outcomes |