BookmarkSubscribeRSS Feed

GAMs in Insurance Modeling

Started a month ago by
Modified a month ago by
Views 119

Introduction

 

The insurance sector operates within an intricate framework of risk evaluation, policy pricing, and claims administration. Central to its operations is the imperative for reliable statistical models capable of forecasting outcomes with precision while customizing policies to meet individual requirements.

 

In response to this demand, Generalized Additive Models (GAM) have gained prominence as a potent instrument, offering adaptability and accuracy beyond conventional methods. This post explores the significance of GAM in insurance modeling, shedding light on its transformative effects within the industry.

 

Evolution of GAMs in Insurance Modeling

 

In the realm of insurance modeling, linear regression models have historically been favored for their straightforwardness and ease of interpretation. Nevertheless, they frequently prove inadequate in capturing the intricate, non-linear dynamics inherent in insurance datasets. The emergence of GAMs has marked a paradigm shift in this domain, enabling the incorporation of non-linear relationships and, thus, furnishing a more comprehensive insight into the complexities of risk assessment.

 

The Mechanics of GAM in Insurance Modeling

 

GAMs expand upon linear models by integrating smooth functions of predictors, thereby capturing the non-linear patterns inherent in the dataset. Unlike their linear counterparts, GAMs refrain from assuming a predetermined form for the relationship between predictors and the response variable. This characteristic renders GAMs exceptionally well-suited for addressing the multifaceted nature of insurance risks.

 

Linear regression enjoys broad usage due to its capacity to offer a straightforward, linear explanation and interpretation of relationships. Moreover, it consolidates the impact of predictor variables into a single value, specifically the predictor variable's coefficient, thereby facilitating clearer comprehension and analysis of the data. Assuming normality, the sampling distribution of the coefficient estimates can be reliably determined, simplifying the assessment of the predictor variable's significance in the model. Additionally, the predictive power of each of the predictors can be assessed and compared by analyzing the standardized coefficients.

 

The linear regression model can be extended in several ways. In Generalized Linear Models (GLM), we can maintain the additive linear parametric structure for the contributions of the predictors. However, instead of directly predicting the mean response of the dependent variable, we can predict a function of the mean of the dependent variable. That is,

 

01_SoumitraDas_bl02_2024_Eq01-300x92.png

 

Where g(.) is the link function. Consequently, the influence of X manifests through (Xβ+ε), allowing for inference to be conducted under the statistical assumption that Y conforms to an exponential family of distributions. The GLM approach remains parametric but offers greater flexibility compared to linear regression.

 

Another method to ease the assumptions of linear regression models is to loosen the parametric structure on the right-hand side of the equation. This involves substituting the (Xβ+ε) component with a more versatile function of X, resulting in what is known as nonparametric regression. Therefore, in nonparametric regressions the model is specified as:

 

02_SoumitraDas_bl02_2024_Eq02.png

 

The primary objective here is to find a multivariate function F that fits the data.

 

The third approach employs a model that preserves the additive structure while allowing for more flexibility. This model does not enforce a rigid linear structure of the independent terms to capture the contribution of each variable. The influence of an independent variable Xj on Y is represented by a nonparametric function of Xj – instead of βjXj, the effect of a predictor variable is now represented by a more versatile function fj(Xj). When summed over predictor variables, this approach offers a more organized form of nonparametric regression known as the additive model. The additive is thus specified as:

 

03_SoumitraDas_bl02_2024_Eq03-300x102.png

 

The functions, fj(Xj), are known as smoothers as the relationship between Y and fj(Xj) is assumed to be smooth and continuous.

 

There are several different types of smoothers available. To circumvent identifiability issues arising from constant terms in fj interfering with the estimation of α, we centralize the fj and assume E[fj(Xj)] = 0, thereby establishing E[Y] = α. The functions, fj, are not predetermined and for simplicity it is a common practice to choose these smothers as univariate functions. The individual functions fj within the additive model can be likened to the coefficients in linear regression. However, the interpretation complexities are heightened vis-à-vis linear regression models. Furthermore, these smoothers are concatenated additively to depict the overall relationship between Y and X variables.

 

It is important to note that the relationship between Y and fj(Xj) may vary across the range of values of Xj. Hence, we use a spline regression approach where the estimation of fj is defined in a piecewise manner within local neighborhoods of the X values.

 

The primary considerations regarding smoothers entail selecting the type or class of smoothers, determining the size of the local neighborhoods for fitting the relationship, and deciding on the level of smoothness for the globally piecewise-patched-together function.

 

The final extension of linear regression incorporates a link function into the additive model. resulting in what is commonly referred to as the Generalized Additive Model (GAM). Similar to GLMs, GAMs generalize on the distribution of the response variable, but extends the additive sum of predictors to encompass a more versatile specification involving the additive sum of predictor functions. Therefore, GAMs can be stated as:

 

04_SoumitraDas_bl02_2024_Eq04-300x77.png

 

where g(.) is the link function and Y is assumed to belong to an exponential family of distributions. With g(.) being invertible we can rewrite the GAM model as:

 

05_SoumitraDas_bl02_2024_Eq05-300x98.png

 

Smoothers

 

The previous section highlighted the fact the smoothers are central to estimating additive models. A typical method used for solving additive models is to use piecewise linear smoothers. In particular, we represent the smooth terms in an additive model using splines. Rather than aiming to understand everything related to spline functions, we can grasp the essence of the theoretical concepts by exploring certain characteristics of cubic splines.

 

06_SoumitraDas_bl02_2024_CubicSplineOut.png

 

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

The figure above illustrates a cubic spline which is a smooth curve formed by connecting sections of cubic polynomials. These sections are joined in a way that ensures the curve is continuous up to its second derivative. The spline in the figure (the dotted curve) comprises seven cubic sections. The points where these sections meet (displayed as ο), including the two endpoints, are termed knots. Each cubic section possesses unique coefficients, but at the knots, they align with the values of its neighboring sections and first two derivatives.

 

Estimating GAMs

 

Estimating a GAM is essentially the task of determining smoothing parameters and model coefficients for a penalized likelihood maximization problem. We select smoothing bases and penalties for each function fj, resulting in model matrices Xj and corresponding smoothing penalties Sj.

 

Let's examine a GAM comprising of X with d covariates, and p smoothing functions fj. Each smoothing function is built using thin-plate regression splines, incorporating a smoothing parameter λj.

 

Thin-plate spline smoothing method estimates the smoothing function fj by minimizing the following over n observations:

 

07_SoumitraDas_bl02_2024_Eq06.png

 

where f=[f(x1),f(x2), … ,f(xn)]T and Jmd is a penalty measure capturing the “wiggliness” of f. The first component assesses the proximity of the fitted values, and the second term penalizes the fit for overall smoothness. λ controls the tradeoff between fit and smoothness. When λ is excessively high, the data tends to be overly smoothed, while if it's too low, the data tends to be insufficiently smoothed.

 

Employing the designated penalized least squares criterion alongside a predetermined λ value, the estimate of the smooth function f can be expressed as:

 

08_SoumitraDas_bl02_2024_Eq07.png

 

Here, δ and θ represent coefficient vectors, with δ constrained by TTδ = 0, where Tij = Φj(xi). Φj are linearly independent polynomials that total up to M.

 

By defining a penalty matrix Eij = ηmd(||xi – xj||), the thin plate spline fitting challenge transforms into:

 

09_SoumitraDas_bl02_2024_Eq08-600x71.png

 

The challenge posed by thin plate splines lies in their computational demands. Except in the single predictor scenario, the computational burden of model estimation scales cubically with the number of parameters.

 

This leads us to investigate whether a low-rank approximation could be generated to closely mimic the thin plate spline smoothing results, while avoiding excessively high computational costs. We can achieve this using thin-plate regression splines.

 

Consider E = UDUT as the eigen-decomposition of E, where D represents a diagonal matrix containing the eigenvalues of E, organized in descending order of absolute values; and the columns of U are the corresponding eigenvectors.

 

Next, let’s denote Uk as the matrix formed by selecting the first k columns of U, and let Dk denote the upper-left k × k submatrix of D. By confining δ within the column space of Uk and representing it as δ = Ukδk, the minimization problem can be restated as:

 

10_SoumitraDas_bl02_2024_Eq09.png

 

This constrained problem can be changed to an unconstrained problem as:

 

11_SoumitraDas_bl02_2024_Eq10.png

 

Where Zk is the orthogonal column basis such that TTUkZk=0.

 

Furthermore, if we assume

 

12_SoumitraDas_bl02_2024_Eq11.png

 

The optimization problem can now be simplified to:

 

13_SoumitraDas_bl02_2024_Eq12-300x63.png

 

The estimates for the β can be obtained by maximizing the penalized log likelihood function for a given set of λs:

 

14_SoumitraDas_bl02_2024_Eq13-300x79.png

 

Where S represents roughness penalty.

 

GAM Node in SAS Dynamic Actuarial Modeling

 

The GAM node in SAS Dynamic Actuarial Modeling solution pipelines accommodates a generalized additive model designed for a binary or interval target variable, incorporating a defined target distribution and link function. It is available in all SAS Dynamic Actuarial advanced templates. The GAM node shields actuarial analysts from the mathematical complexities involved in estimation process illustrated earlier.

 

The GAM node seamlessly incorporates all interval input variables as univariate splines. As far as class variables are concerned, we have the option to exclude them from the analysis. If included, then we can convert them to design (dummy) variables using either “GLM” or “Deviation” coding styles.

 

Additionally, it offers two model selection methods – boosting and shrinkage – to effectively manage and minimize the number of effects in the model. The boosting method selects and estimates a specific adaptation of the gradient descent method, and the model can consist of only parametric effects, only spline effects or a combination of both.

 

On the other hand, the shrinkage method performs the selection only on the spline terms in the model. The method mandates the inclusion of at least one spline term and employs a grid search to screen the tuning parameters for the sparsity-inducing penalties.

 

15_SoumitraDas_bl02_2024_GAM04.png

 

For more information about the GAM node, see Overview of GAM in SAS Viya: Machine Learning Node Reference.

 

Challenges and limitations of using GAMs in Insurance Modeling

 

One significant challenge is the selection of smoothing parameters, which control the model’s flexibility. Excessive smoothing may result in an oversimplified model, while insufficient smoothing can lead to excessive complexity.

 

Moreover, the interpretability of GAMs pose a dilemma. The “black box” nature of these models often obscures the logic behind predictions, making it difficult for analysts to explain outcomes to stakeholders.

 

SAS Dynamic Actuarial Modeling solution employs various tools like Variable Importance tables, Partial Dependency plots, Individual Conditional Expectation (ICE) plots, etc. to mitigate this interpretability quandary.

 

The flexibility of GAMs, though advantageous, also raises concerns of overfitting. To address this, techniques like regularization and cross-validation becomes crucial for preventing such occurrences.

 

Compliance with industry standards is often a non-negotiable aspect of insurance modeling. GAMs must adhere to regulatory requirements, which include model validation and documentation. Ethical considerations also come into play, as models must avoid unfair discrimination in predictions. Ensuring that GAMs meet these standards without compromising their predictive power is a complex challenge.

 

Additional Information

 

For more information on SAS Dynamic Actuarial Modeling visit the software information page here.

 

For more information on curated learnings paths on SAS Solutions and SAS Viya, visit the SAS Training page. You can also browse the catalog of SAS courses here.

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
a month ago
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Labels