

FlashChat  Actuarial Discussion  Preliminary Exams  CAS/SOA Exams  Cyberchat  Around the World  Suggestions 
Browse Open Actuarial Jobs 

Thread Tools  Search this Thread  Display Modes 
#21




Quote:
Another related reason it would not be good enough is because the assumptions don't fit the data so what does it even mean to maximize the poisson likelihood? A third reason it would not be good enough is because you chose the wrong validation metrics and loss functions to optimize. Do you really want to minimize say MSE if large outliers are expected? Think about what Poisson data looks like (0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2). And is looking at it from the perspective of "sorting accuracy" as with the Gini index correct?
__________________
7 8 9 Last edited by FactuarialStatement; 02182019 at 03:08 PM.. 
#23




Quote:
I definitely have a lot to go in terms of domain knowledge. 
#24




I guess if you round your losses to the nearest INT then you might get the model estimation to begin to run  I doubt it would ever converge. I actually caught a guy once at work implementing the coefficients from an h20 model that didn't converge. So I can't say I'm surprised by this.
Suppose it converged. Most of the observations are 0, but then several are in the thousands+, and we are minimizing poisson deviance? This model sounds so bad
__________________
7 8 9 
#25




Quote:
Here's the syntax I'm using for Poisson: set.seed(1111) model.poisson < glm(formula = model.formula, family = poisson(link = "log"), data = data.train, weights = log(Exposure)) Here's the syntax I'm using for Tweedie: set.seed(1111) model.tweedie < glm(formula = model.formula, family = tweedie(var.power = p, link.power = 0), data = data.train, weights = log(Exposure)) Found a relevant SX: https://stats.stackexchange.com/ques...ntegernumbers Last edited by Actuarially Me; 02182019 at 03:40 PM.. 
#26




Quote:
But as someone else already mentioned, it could be due to my data being heavily frequency based. 
#27




Quote:
Quote:
Quote:
When I'm working on a pricing model I am ultimately really trying to do two things: segment the risk as much as possible in terms of a rankordering (the best risks get the best prices and viceversa) and price every segment at the expected loss. Pretty much every other modeling choice, such as maximizing a likelihood, is intermediate to those tasks or a tool to get at them. In other words, if you are confident in how you are evaluating the model, it shouldn't matter whether or not the underlying data can't actually be Poisson and your model is.
__________________
i always post when i'm in a shitty mood. if i didn't do that, i'd so rarely post. AO Fan Lucky for you I was raised by people with a good moral center because if that were not the case, you guys would be in a lot of trouble. So be very, very glad people like me exist. Your future basically depends on it. jas66kent The stock market is going to go up significantly due to Trump Economics jas66kent 
#28




Quote:
Quote:
Quote:
__________________
7 8 9 
#29




Quote:
Here's a tip for the OP. Take your poisson model, look up randomized quantile residuals  it is implemented in the DHARMa package in R and easy to code yourself as well with use of the simulate() function. Google for Gelman's comments on simulation tests of model assumptions and get familiar with why you need to do it. Test some of your model assumptions to see how appropriate to the data they are  test the zero inflation and dispersion. Report back here with how BADLY you fail those tests.
__________________
7 8 9 
#30




I'm just gonna leave this code here. Report back if you figure it out but I can't [try to] help you anymore.
library(statmod) library(magrittr) library(tibble) set.seed(42) tbl < tibble(x1 = rnorm(1000, 100, 10), x2 = runif(1000), x3 = rgamma(1000, 50), y = rgamma(1000, 10*x1, .05)* rpois(1000, .05*x1)) %>% mutate(x1 = x1 %>% scale, x2 = x2 %>% scale, x3 = x3 %>% scale) cool_model_bro < glm(y ~ ., "poisson", tbl) summary(cool_model_bro) lolwut < glm(y ~ ., tweedie(var.power = 1.5,link.power = 0), tbl) summary(lolwut)
__________________
7 8 9 Last edited by FactuarialStatement; 02182019 at 07:24 PM.. 
Tags 
glm, poisson, tweedie 
Thread Tools  Search this Thread 
Display Modes  

