GLMs - Anderson Flashcards
Problems with One-way analysis
- Potentially distorted by correlations among rating variables.
- Does not consider inter-dependencies between rating variables in the way they impact what is being modeled.
Problems with Classical Linear Models
- It is difficult to assert Normality and constant variance for response variables.
- The values of the dependent variable (the Y variable) may be restricted to positive values, but the assumption of Normality violates this restriction.
- If Y is always positive, then intuitively the variance of Y moves toward zero as the mean of Y moves toward zero, so the variance is related to the mean.
- The linear model only allows for additive relationships between predictor variables, but those might be inadequate to describe the response variable.
Benefits of GLMs
- The statistical framework allows for explicit assumptions about the nature of the data and its relationship with predictive variables.
- The method of solving GLMs is more technically efficient than iterative methods.
- GLMs provide statistical diagnostics which aid in selecting only significant variables and validating model assumptions.
- Adjusts for correlations between variables and allows for interaction effects.
Steps to solving a Classical Linear Model
- Set up the general equation in terms of Y, ß, and X’s.
- Write down an equation for each observation by replacing X’s and Y with observed values in data. You will have the same number of equations as observations in the data. For observation i, the equation may contain some ß values and will contain errori.
- Solve each equation for the errori.
- Calculate the equation for the Sum of Squared Errors (SSE) by plugging in the errori2 formulas. SSE = Σ (i = 1 to n) of errori2
- Minimize the SSE by taking derivatives of it with respect to each ß and setting them equal to 0.
- Solve the system of equations for the ß values.
Components of Classical Linear Models
- Systematic - The p covariates are combined to give the “linear predictor” eta, where eta = ß1 X1 + ß2X2 + ß3X3 +…+ ßpXp
- Random - The error term, is Normally distributed with mean zero and variance sigma2. Var(Yi) = sigma2
- Link function - Equal to the identity function.
Components of Generalized Linear Models
- Systematic - The p covariates are combined to give the “linear predictor” eta, where eta = ß1 X1 + ß2 X2 + ß3 X3 +…+ ßp Xp
- Random - Each Yi is independent and from the exponential family of distributions. Var(Yi) = phi * V(mui) / omegai
- Link function - Must be differentiable and monotonic.
Common exponential family distribution variance functions
Error Distribution & Variance Function
Normal : V(x) = 1 (as in a Classical Linear Model)
Poisson : V(x) = x
Gamma : V(x) = x2
Binomial : V(x) = x(1 - x)
Inverse Gaussian : x3
Teedie : V(x) = (1 / lambda) * xp, where p < 0 or 1 < p < 2 or p > 2
Methods of estimating the scale parameter
- Maximum likelihood (not feasible in practice)
- The moment estimator (Pearson chi2 statistic): phi hat = (1 / (n-p)) * Σ (i=1 to n) [(omegai * (Yi - mui)2) / V(mui)]
- The total deviance estimator : phi hat = D / (n-p)
Common Link Functions
Link Function: Function, & Inverse Function
Identity: eta, eta
Log: ln(eta), eeta
Logit: ln(eta / (1-eta)), eeta / (1+eeta)
Reciprocal: 1 / eta, 1 / eta
Common model forms for insurance data
- Claim frequencies/counts - Multiplicative Poisson (Log link function, Poisson error term)
- Claim severity - Multiplicative Gamma (Log link function, Gamma error term)
- Pure Premium - Tweedie (compound of Poisson and Gamma above)
- Probability (i.e., of policyholder retention) - Logistic (Logit link function, Binomial error term)
Aliasing and near-aliasing
Aliasing is when there is a linear dependency among the covariates in the model. Types of aliasing:
- Intrinsic aliasing - When the linear dependency occurs by definition of the covariates.
- Extrinsic aliasing - When the linear dependency occurs by the nature of the data.
- Near-aliasing - When covariates are nearly linearly dependent, but not perfectly linearly dependent.
Ways to decide whether to include a factor in the model
- Size of confidence intervals (usually viewed graphically in practice)
- Type III testing
- See if the parameter estimate is consistent over time
- Intuitive that factor should impact result
Type III test statistics
- chi2 test statistic = D1* - D2* ~ chi2 (df1 - df2)
- F test statistic = [(D1 - D2) / (df1 - df2)] / (D2 / df2) ~ F (df1 - df2), df2