Generalised linear model (GLM)
A generalised linear model is a regression model in which a chosen distribution describes the outcome and a link function connects the average outcome to a weighted sum of explanatory variables. Logistic regression for default and Poisson regression for claim counts are examples.
What it is
A generalised linear model (GLM) is a regression model that relates an outcome to explanatory variables when the outcome is not a continuous number with a bell-shaped spread. The outcome can be a yes or no, a count or a positive amount. A GLM keeps the weighted sum of the variables used in ordinary regression and adds two choices that fit the outcome.
The parts of a GLM are:
- A distribution for the outcome, such as binomial for yes or no, Poisson for counts and gamma for positive amounts.
- A linear predictor, the weighted sum of the explanatory variables plus a constant.
- A link function g, which connects the average outcome to the linear predictor.
In symbols, g(E[Y]) = b0 + b1 x1 + … + bk xk. Here Y is the outcome, E[Y] its average, x1 to xk the explanatory variables, and b0 to bk the coefficients that are fitted to data.
With a normal distribution and an identity link the GLM is ordinary linear regression. With a binomial distribution and a logit link it is logistic regression. The Institute and Faculty of Actuaries describes GLMs in non-life pricing, where Poisson regression is used for claim frequency and gamma regression for claim severity.
Why it matters
Many outcomes in finance are binary or counts: a borrower defaults or not, a policy has zero, one or several claims. Ordinary regression can return probabilities below zero or above one for such outcomes. A GLM keeps the estimates in a valid range.
The fitted coefficients are readable. Each one states how an explanatory variable moves the outcome, which lets reviewers and users see why a score or a price changed.
Worked example
Illustrative numbers. A logistic regression models default with one variable, the number of missed payments in the last year. The fitted model is: log-odds of default = -3.0 + 0.7 x, where x is the number of missed payments.
- For x = 0, the log-odds are -3.0, the odds are about 0.05 and the probability of default is about 5 percent.
- For x = 2, the log-odds are -1.6, the odds are about 0.20 and the probability is about 17 percent.
- Each extra missed payment multiplies the odds by about 2, since the exponential of 0.7 is about 2.
How to read it
A positive coefficient raises the average outcome and a negative one lowers it. With a log link, a coefficient acts as a multiplier on the outcome. With a logit link, it acts as a multiplier on the odds. A coefficient is read with the other variables held fixed.
Assumptions
- The chosen distribution is a reasonable description of the outcome and its spread.
- The link function matches the way the variables act on the outcome.
- Observations are independent of each other, or the dependence is modelled.
- Explanatory variables are not so closely related that the coefficients become unstable.
Who uses it
- Credit risk model developers fit logistic regressions to estimate probability of default and to build scorecards.
- Actuaries fit Poisson and gamma models to price insurance and to estimate claim frequency and severity.
- Statisticians choose the distribution and link, and test the fit with residuals and hold-out data.
- Model validators check the variable selection, the stability of coefficients and the performance on unseen data.
Common confusions
- A generalised linear model is not the same as the general linear model, the name sometimes used for ordinary linear regression.
- Linear refers to the predictor, not to the outcome; the relation between variables and outcome is curved when the link is not the identity.
- Logistic regression is one GLM among several, not a separate technique.
- A coefficient is not a probability change; with a logit link it is a change in log-odds.