1 / 23

Applications of Using GLM Offset Option

Applications of Using GLM Offset Option. Jun Yan - Deloitte Consulting LLP Matthew Flynn - ISO. Applications of Using GLM Offset Option. Introduction Constrained, multiple factors analysis Sequential Modeling Run Time Dynamic Offset. Introduction

Download Presentation

Applications of Using GLM Offset Option

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applications of Using GLM Offset Option Jun Yan - Deloitte Consulting LLP Matthew Flynn - ISO

  2. Applications of Using GLM Offset Option • Introduction • Constrained, multiple factors analysis • Sequential Modeling • Run Time Dynamic Offset

  3. Introduction Intuitively, it is a method used to run a model against the residual of a set of given factors. Mathematically Y-g(z) = f(x) Where Y is the target variable, z are the offset variables, and x are the explanatory variables. “Y-g(z) ”is the residual generated with offset.

  4. Constrained, multiple factors analysis • Business reasoning • An Example • A frequency model with two predictive variables: • 1. Driver_age_group (1, 2, 3 and 4) • 2. Type (‘S’(Single) and ‘M’(Multi)) • Required Constraints: • 1. The frequency relativities of driver_age_group for ‘3’ • and ‘4’ are 1.05 and 1.25, respectively. • 2. The other relativities are estimated using GLM

  5. Constrained, multiple factors analysis An Example – SAS Code data freq_data; set input; claim_freq=claim_count / exposure; ************************ Define offset factors *****************************************************; offset_factor=1; if driver_age_group =3 then offset_factor=1.05; if driver_age_group =4 then offset_factor=1.25; logoffset=log(offset_factor); *********** Put the constraint as the base of the new variable****; if driver_age_group in (1,2) then driver_age_group_new= driver_age_group; else driver_age_group_new =9; run; proc genmod data=freq_data; class driver_age_group_new type; model claim_freq = driver_age_group_new type / dist=poisson link=log offset= logoffset; run;

  6. Constrained, multiple factors analysis An Example – Parameter Estimates and Final Result

  7. Sequential Modeling • Why need sequential modeling? • Tear down a complicated modeling process to a sequence of simple modeling steps • To better identify significance of adding new variables • To generate reasonable model estimates • Regulatory Considerations (E.g. California Proposition 103) • “personal automobile insurance rates must be determined • using the following factors in decreasing order of importance– • insured's driving safety record, number of miles driven • annually by the insured, and number of years of driving • experience the insured has had.”

  8. Sequential Modeling • A simple example for sequential modeling • Using 3 variables, • type • driver_age_group • vehicle_use • to generate frequency tables for PD coverage. • Assume driver_age_group and vehicle_use are interactive • Two steps sequential modeling • Model marginal effects • Model interaction of driver_age_group and vehicle_use

  9. Sequential Modeling Example Step 1 - Model Marginal Effects Model Setup Input Dataset = The PD Modeling Dataset; Target Variable = pd_freq (pd_claim_count/pd_exposure); Three Categorical Predictive Variables = type (value: ‘M’ and ‘S’) driver_age_group (value: 1, 2, 3, 4) vehicle_use (value: ‘PL’, ‘WK’); model pd_freq = type driver_age_group vehicle_use; Distribution = poisson; Link Function = Log; weight = pd_exposure;

  10. Sequential Modeling Example Step 1 - Model Marginal Effect Model Output: 2 Parameter Estimates and Frequency Relativities

  11. Sequential Modeling Example Step 2 – Model Interactions Create an offset factor using the estimates of Step 1 Model output offset_mod1=0; if Type='M' then offset_mod1 = offset_mod1 + -0.26; if Type='S' then offset_mod1 = offset_mod1 + 0.00; if Driver_age_group = 1 then offset_mod1 = offset_mod1 + 0.37; if Driver_age_group = 2 then offset_mod1 = offset_mod1 + 0.04; if Driver_age_group = 3 then offset_mod1 = offset_mod1 + -0.63; if Driver_age_group = 4 then offset_mod1 = offset_mod1 + 0.00; if Vehicle_Use = 'PL' then offset_mod1 = offset_mod1 + -0.36; if Vehicle_Use = 'WK' then offset_mod1 = offset_mod1 + 0.0000;

  12. Sequential Modeling Example Step 2 - Model Interactions ModelSetup Input Dataset = The PD Modeling Dataset; Target Variable = pd_freq (pd_claim_count/pd_exposure); Two Categorical Predictive Variables = driver_age_group (value: 1, 2, 3, 4) vehicle_use (value: ‘PL’, ‘WK’); model pd_freq = Driver_age_group*Vehicle_Use; Distribution = Poisson; Link Function = Log; Offset = offset_mod1; weight = pd_exposure;

  13. Sequential Modeling Example Step 2 - Model Interactions Model Output

  14. Sequential Modeling Final Result from combining two steps

  15. Run Time Dynamic Offset • What is “Run Time Dynamic Offset”? • Select offset variables • Insert those offset variables to regression as predictive variables and run the regression • Zero out the parameter estimates of the offset variables from the post modeling score program • When we need a “Run Time Dynamic Offset”? • 1. Offset factors are not given • 2. Offset factors are dynamically changed

  16. Run Time Dynamic Offset • A simple example for run time dynamic offset • Create PD frequency relativities for class plan variables • A Business Initiatives: • Create frequency relativity tables for PD • Need to remove the territory bias from frequency model output • Modeling Issues: • Territory Frequency relativity table is not available • The territory impact on model output is dynamic

  17. Run Time Dynamic Offset Frequency Model Setup Input Dataset = The PD Modeling Dataset; Target Variable = pd_freq ( pd_claim/pd_exp); 4 Categorical Predictive Variables = driver_age_group (value: 1, 2, 3, 4) vehicle_use (value: ‘PL’, ‘WK’) type (‘S’, ‘M’) territory(1, 2, 3, 4, 5); model pd_freq = Driver_age_group Vehicle_Use Type Territory; Distribution = poisson; Link Function = Log; weight = pd_exp;

  18. Run Time Dynamic Offset Frequency Model Output

  19. Run Time Dynamic Offset Frequency Model Output – After Offsetting Territory Impact

  20. Run Time Dynamic Offset (RTDO) • RTDO is equivalent to a two step regressionprocess • Insert the offset variables to the first regression as predictive variables and run the regression • Set up an offset parameter using the estimates of the offset variables from the prior regression to run the second regression

  21. Run Time Dynamic Offset (RTDO) • RTDO is equivalent to a process with two step regressions • Step 1: Create Territory Offset • Terr_offset = 0; • if territory = ‘T1’ then terr_offset = -0.55; • if territory = ‘T2’ then terr_offset =-0.40; • if territory = ‘T3’ then terr_offset =-0.25; • if territory = ‘T4’ then terr_offset =-0.18;

  22. Run Time Dynamic Offset (RTDO) • RTDO is equivalent to a process with two step regressions • Step 2: Model Setup • Input Dataset = The PD Modeling Dataset; • Target Variable = pd_freq ( pd_claim/pd_exp); • 4 Categorical Predictive Variables = driver_age_group (value: 1, 2, 3, 4) • vehicle_use (value: ‘PL’, ‘WK’) • type (‘S’, ‘M’); • model pd_freq = Driver_age_group Vehicle_Use Type; • Distribution = poisson; • Link Function = Log; • Offset = terr_offset; • weight = pd_exp;

  23. Summary of the Presentation • Why offset? • To eliminate the impact of the variables that will not be included in the model but will influence modeling results • Specific Applications • Constrained Modeling • Sequential modeling • Runtime Dynamic Offset

More Related