Generalized Linear Model
Study guides: Exam SRM, Exam PA, Exam MAS-I, Exam 5, Exam PCPA, Exam 8, Exam ACIA-CAPSTONE, Exam F1PC, Exam F2ILA
A Generalized Linear Model (GLM) is a regression model in which the responses Y_1, \ldots, Y_n are independent, each has a distribution from the exponential family, and a link function of each mean is a linear combination of the predictors. The mean of observation i, \mu_i = E[Y_i], is related to its linear predictor \eta_i by
g(\mu_i) = \eta_i
and the linear predictor is
\eta_i = \beta_0 + \beta_1 x_{i1} + \cdots + \beta_p x_{ip}
gis the link function, a monotonic and differentiable function.x_{ij}is the value of predictorjfor observationi.\beta_0, \ldots, \beta_pare the coefficients, estimated by maximum likelihood.
The fitted mean is the inverse of the link function applied to the linear predictor, \hat{\mu}_i = g^{-1}(\hat{\eta}_i). Linear regression is the GLM with a normal response and the identity link, g(\mu) = \mu.
A Poisson GLM with a log link models claim frequency. The fitted coefficients are an intercept of
-2.30,0.25for territory B (territory A is the base level) and-0.03per year of vehicle age. What is the expected frequency for a territory B vehicle that is 5 years old?
- The base level, territory A, has no coefficient, so territory B adds
0.25to the linear predictor.- Vehicle age is continuous, so it adds its coefficient multiplied by its value,
-0.03 \times 5 = -0.15.- The linear predictor is
\hat{\eta} = -2.30 + 0.25 - 0.15 = -2.20.- The inverse of the log link is the exponential function, so the expected frequency is
e^{-2.20} = 0.1108.
Choosing the distribution and the link
The distribution of the response is chosen to match the values the response can take, and the link is chosen to keep the fitted mean in that range:
| Response | Distribution | Usual link |
|---|---|---|
| Continuous and symmetric, constant variance | Normal | Identity, \mu |
| Claim count | Poisson | Log, \ln \mu |
| Yes or no, such as a renewal | Binomial | Logit, \ln\frac{\mu}{1-\mu} |
| Claim severity, positive and right-skewed | Gamma | Log, \ln \mu |
| Pure premium, with a mass at zero | Tweedie, 1 < p < 2 |
Log, \ln \mu |
The log link makes the effects of the predictors multiplicative, which matches a multiplicative rating plan.
Which distribution and link should model whether each policy renews?
- The response is 1 if the policy renews and 0 if it does not, so it is binary.
- A binary response has a binomial distribution, whose mean is the probability of renewal.
- The logit link maps that probability, which lies between 0 and 1, to the whole real line, so the fitted probabilities stay between 0 and 1.
- The model is a binomial GLM with a logit link, which is logistic regression.
Advantages over one-way analysis
A GLM estimates the effects of all the predictors at the same time, so each coefficient is the effect of its predictor with the other predictors held fixed. Compared with a one-way analysis of each rating variable on its own, a GLM
- accounts for the correlation among rating variables, so an effect shared by two correlated variables is not counted twice,
- separates the systematic effect of each variable from random noise,
- provides diagnostics for the model and for each variable, such as standard errors and significance tests,
- can include an interaction, where the effect of one variable depends on the level of another.
Because a one-way analysis mixes the effects of correlated variables, its relativity for a variable can differ in size, or even in sign, from the GLM's.
Young drivers are concentrated in the urban territory. A one-way analysis gives the urban territory a frequency relativity of 1.40, and a GLM with driver age and territory gives it 1.15. Why do they differ, and which relativity should be used with the driver age relativities?
- The one-way relativity compares urban and rural frequencies without regard to age, so part of the higher frequency of young drivers shows up as a territory effect.
- The GLM estimates territory with driver age held fixed, so its relativity of 1.15 is the effect of territory alone.
- Multiplying the one-way relativity of 1.40 by an age relativity would count the young-driver effect twice.
- The GLM relativity of 1.15 is the one to use with the GLM's driver age relativities.
Evaluating a rating variable from GLM output
Each level of a categorical rating variable is reported as a relativity to the base level, whose relativity is 1.00. The base level is usually the level with the most exposure. A rating variable is worth adding to the model when
- its relativities follow a sensible pattern, such as a steady increase across ordered levels with no reversals,
- the band of plus and minus two standard errors around each relativity, which is roughly a 95% confidence interval, is narrow, so that each level can be told apart from its neighbours and from the base level,
- the relativities are consistent when the model is fitted to each year of data separately, which shows that the effect is stable over time rather than the noise of one year,
- the model with the variable predicts better on a holdout sample that was not used to fit it.
A level with little exposure has wide standard errors because of its small volume, so its relativity is unreliable. Such a level may be combined with an adjacent level. A level whose band includes 1.00 cannot be distinguished from the base level.
A GLM for frequency gives these results for a rating variable with four ordered levels. Is the variable worth keeping, and how should level 4 be handled? The coefficients are on the log scale, and the base level is level 1:
Level Exposure \hat{\beta}Standard error 1 50,000 0 2 30,000 0.10 0.03 3 15,000 0.22 0.04 4 800 0.12 0.20
- The relativity of each level is
e^{\hat{\beta}}, and its band ise^{\hat{\beta} - 2\text{SE}}toe^{\hat{\beta} + 2\text{SE}}.- Level 2 has relativity
1.105with band1.041to1.174, and level 3 has relativity1.246with band1.150to1.350.- Levels 1 to 3 increase steadily, and the bands of levels 2 and 3 exclude 1.00, so the variable separates risk where most of the exposure is.
- Level 4 has relativity
1.127, a reversal from level 3, with band0.756to1.682, which includes 1.00.- Level 4 has only 800 exposures, so its wide band reflects thin data. The variable is worth keeping, and level 4 should be combined with level 3.
Practice questions
- CAS Exam 5 Fall 2013, Question 11
- CAS Exam 5 Spring 2013, Question 12
- CAS Exam 5 Fall 2014, Question 10
- CAS Exam 5 Spring 2014, Question 9
- CAS Exam 5 Fall 2015, Question 10
- CAS Exam 5 Spring 2016, Question 10
- CAS Exam 5 Spring 2017, Question 8
- CAS Exam 5 Fall 2017, Question 11
- CAS Exam 5 Fall 2018, Question 9
- CAS Exam 5 Spring 2018, Question 13
- CAS Exam 5 Spring 2019, Question 9
- CAS Exam 5 Fall 2019, Question 10
- CAS Exam 5 Fall 2019, Question 11
- CAS Exam 7 Spring 2012, Question 9
- CAS Exam 7 Spring 2013, Question 7
- CAS Exam 7 Spring 2014, Question 9
- CAS Exam 7 Spring 2015, Question 11
- CAS Exam 7 Spring 2016, Question 12
- CAS Exam 7 Spring 2016, Question 14
- CAS Exam 7 Spring 2018, Question 13
- CAS Exam 7 Spring 2019, Question 12
- CAS Exam 8 Fall 2012, Question 2
- CAS Exam 8 Fall 2013, Question 2
- CAS Exam 8 Fall 2013, Question 4
- CAS Exam 8 Fall 2014, Question 3
- CAS Exam 8 Fall 2015, Question 2
- CAS Exam 8 Fall 2015, Question 3
- CAS Exam 8 Fall 2016, Question 4
- CAS Exam 8 Fall 2016, Question 5
- CAS Exam 8 Fall 2016, Question 6
- CAS Exam 8 Fall 2017, Question 1
- CAS Exam 8 Fall 2017, Question 5
- CAS Exam 8 Fall 2018, Question 5
- CAS Exam 8 Fall 2019, Question 6
- Exam ATPA Practice Question 27
- Exam ATPA Practice Question 28
- Exam DISC-DA Practice Question 216
- Exam DISC-RM Practice Question 410
- CAS Exam MAS-I Fall 2018, Question 26
- CAS Exam MAS-I Fall 2018, Question 27
- CAS Exam MAS-I Fall 2018, Question 28
- CAS Exam MAS-I Fall 2018, Question 31
- CAS Exam MAS-I Spring 2018, Question 24
- CAS Exam MAS-I Spring 2018, Question 25
- CAS Exam MAS-I Spring 2018, Question 27
- CAS Exam MAS-I Spring 2018, Question 28
- CAS Exam MAS-I Spring 2018, Question 29
- CAS Exam MAS-I Spring 2018, Question 37
- CAS Exam MAS-I Spring 2018, Question 39
- CAS Exam MAS-I Fall 2019, Question 25