Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Property - Casualty / General Insurance
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions



Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 12-21-2018, 12:50 PM
itGetsBetter itGetsBetter is offline
Member
CAS AAA
 
Join Date: Feb 2016
Location: Midwest
Studying for Exam 9
Favorite beer: Spruce Springsteen
Posts: 85
Default

Quote:
Originally Posted by ALivelySedative View Post
I've had issues getting this to work in the past. My GLM knowledge is limited to tinkering though. Ran a pure premium model against a line of business just to see what it would do, and the default Tweedie package leaves AIC blank, which is explained in the documentation, but I never could get AICtweedie to work at all from what I recall.
Here's the syntax that I use:

m1 <- glm(target~1+predictor1+predictor2
,data=trainingDataframe
,family=tweedie(var.power=1.6,link.power=0)
,weights=weightVariable)

summary.m1 <- summary(m1)
summary.m1$aic <-AICtweedie(m1,2)
summary.m1
__________________
P | FM | MFE | C | S | 5 | 6 | 7 | 8 | 9
VEEs | Course 1 | Course 2 |
Reply With Quote
  #12  
Old 12-21-2018, 01:27 PM
ALivelySedative's Avatar
ALivelySedative ALivelySedative is offline
Member
CAS
 
Join Date: Dec 2013
Location: Land of the Pine
College: UNC-Chapel Hill Alum
Favorite beer: Red Oak
Posts: 2,823
Default

Quote:
Originally Posted by itGetsBetter View Post
Here's the syntax that I use:

m1 <- glm(target~1+predictor1+predictor2
,data=trainingDataframe
,family=tweedie(var.power=1.6,link.power=0)
,weights=weightVariable)

summary.m1 <- summary(m1)
summary.m1$aic <-AICtweedie(m1,2)
summary.m1
Nice, thanks! I'll give it another shot at some point. Glad to see someone else ballparks a 1.6 there as well (which makes intuitive sense anyway).
__________________
Stuff | 6 | ACAS | FCAS stuff
Reply With Quote
  #13  
Old 01-11-2019, 10:44 AM
Actuarially Me Actuarially Me is offline
Member
CAS
 
Join Date: Jun 2013
Posts: 41
Default

Quote:
Originally Posted by itGetsBetter View Post
Here's the syntax that I use:

m1 <- glm(target~1+predictor1+predictor2
,data=trainingDataframe
,family=tweedie(var.power=1.6,link.power=0)
,weights=weightVariable)

summary.m1 <- summary(m1)
summary.m1$aic <-AICtweedie(m1,2)
summary.m1

Thanks! Another quick question. If you're modeling pure premium as the target, do you continue to use the exposure as the weight? I think the math checks out given the tweedie distribution, but intuitively seems like you're double counting exposure.
Reply With Quote
  #14  
Old 01-11-2019, 12:36 PM
itGetsBetter itGetsBetter is offline
Member
CAS AAA
 
Join Date: Feb 2016
Location: Midwest
Studying for Exam 9
Favorite beer: Spruce Springsteen
Posts: 85
Default

Quote:
Originally Posted by Actuarially Me View Post
Thanks! Another quick question. If you're modeling pure premium as the target, do you continue to use the exposure as the weight? I think the math checks out given the tweedie distribution, but intuitively seems like you're double counting exposure.
If you are creating a policy level model, yes, because policies with large exposures make up more of the risk. Check out the table on page 8 of this link: https://www.casact.org/education/rpm...ion_1022_0.pdf

You could tinker around with weights, though.
Reply With Quote
  #15  
Old 01-11-2019, 03:06 PM
Actuarially Me Actuarially Me is offline
Member
CAS
 
Join Date: Jun 2013
Posts: 41
Default

Interesting. Is that just due to the nature of the tweedie distribution? Since Pure premium already divides by the exposure. Having Exposure as the weight seems like it'd be double counting it.
Reply With Quote
  #16  
Old 01-11-2019, 03:29 PM
itGetsBetter itGetsBetter is offline
Member
CAS AAA
 
Join Date: Feb 2016
Location: Midwest
Studying for Exam 9
Favorite beer: Spruce Springsteen
Posts: 85
Default

Quote:
Originally Posted by Actuarially Me View Post
Interesting. Is that just due to the nature of the tweedie distribution? Since Pure premium already divides by the exposure. Having Exposure as the weight seems like it'd be double counting it.
No, it's not unique to Tweedie, or even pure premium. For claim frequency models, the weight is exposure, even though frequency is claim count/exposure. For severity models, the weight is claim count, even though severity is loss/claim count. You want the model to be better at fitting policies where most of your exposure resides.

I think of it like an aggregated pure premium calculation. To get the pure premium for the whole book, we sum up all of the loss divided by the sum of all of the exposures. Another way to calculate the same figure would be a weighted average of the pure premium for each policy, where the weight is the exposure. If we calculated a straight average of pure premium, it would not be the actual book's pure premium because not enough weight was given to large exposure policies, and too much weight was given to small exposure policies.
Reply With Quote
  #17  
Old 01-11-2019, 03:41 PM
Actuarially Me Actuarially Me is offline
Member
CAS
 
Join Date: Jun 2013
Posts: 41
Default

Thanks! Hopefully your name rings true!

Having a hell of a time getting a decent model in R. My residuals, DF, and AIC are all extremely large.
Reply With Quote
  #18  
Old 01-11-2019, 04:07 PM
itGetsBetter itGetsBetter is offline
Member
CAS AAA
 
Join Date: Feb 2016
Location: Midwest
Studying for Exam 9
Favorite beer: Spruce Springsteen
Posts: 85
Default

Quote:
Originally Posted by Actuarially Me View Post
Thanks! Hopefully your name rings true!

Having a hell of a time getting a decent model in R. My residuals, DF, and AIC are all extremely large.
You're welcome. I would recommend trying out some lift-based measures. A double lift curve will hopefully show that your model is better than the current rater. Model accuracy may be very poor from a traditional perspective, but if it differentiates between your best and worst insureds, it should save your company money. The goal here is reducing adverse selection, not predicting actual policy losses.
Reply With Quote
  #19  
Old 01-11-2019, 04:13 PM
Actuarially Me Actuarially Me is offline
Member
CAS
 
Join Date: Jun 2013
Posts: 41
Default

That's true. What measures do you use to compare models within the Tweedie GLM?

My initial run showed 93,000 degrees of freedom using the same variables as the current rater. Also, do you do any sort of cross validation?
Reply With Quote
  #20  
Old 01-11-2019, 04:34 PM
itGetsBetter itGetsBetter is offline
Member
CAS AAA
 
Join Date: Feb 2016
Location: Midwest
Studying for Exam 9
Favorite beer: Spruce Springsteen
Posts: 85
Default

Quote:
Originally Posted by Actuarially Me View Post
That's true. What measures do you use to compare models within the Tweedie GLM?

My initial run showed 93,000 degrees of freedom using the same variables as the current rater. Also, do you do any sort of cross validation?
I would recommend the lift-based measures in Chapter 7 of the GLM monograph for comparing models. Within the Tweedie GLM, I occasionally peak at AIC to make sure that the model is getting better instead of worse when I add a variable. Though, I mainly use lift charts and Gini coefficients for that, too. I don't use cross validation in the automated sense, but sometimes I re-fit the same variables on different subsets of my training data to check for coefficient and p-value instability.
Reply With Quote
Reply

Tags
glm tweedie, weights

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 08:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.14840 seconds with 9 queries