Questions tagged [tweedie]

A family of probability distributions, which is a special case of exponential dispersion models.

41 questions
0
votes
1 answer

Error while running statsmodels in colab "estimate_tweedie_power() missing 1 required positional argument: 'mu'"

Modeling Tweedie distribution in statsmodels in Google Colab, but I'm getting an error while trying to use estimate_tweedie_power function. Here is the code from my notebook. #Training model tweedie_model = sm.GLM(y_train, X_train, exposure =…
0
votes
0 answers

Error in glm.fit when using a tweedie distribution with log link

When running glm in R using tweedie and log link, I run into "Error in glm.fit ... NA/NAN/INF in x" I have tried using different distributions and links. I have also tried adding 1 to the response because it is insurance data with lots of 0s. I…
rm1906
  • 1
0
votes
0 answers

Tweedie distribution error in R

I cannot debug the following Tweedie error in R. The tweedie function code has worked in other applications and I have checked the data. Any help would be appreciated. glm1a <- glm(Incurred_Loss ~ operator_age_group + credit_group + …
0
votes
0 answers

GLM model with a Tweedie distribution

I am trying to build a GLM model in Python. I am using statsmodel and based on the domain knowledge that I have in insurance, my dependent variable has Tweedie distribution. Following is the piece of code I have used: practice_model = practice_model…
Saeedeh
  • 21
  • 3
0
votes
1 answer

Ridge Regression always returns Error

I am attempting to run a ridge regression for a Tweedie distribution using the HDtweedie package. I have no problem whatsoever running elastic net with any level of alpha, except for 0. When I try to run ridge, it always outputs: Error in if…
J. Gursky
  • 121
  • 1
  • 9
0
votes
0 answers

R Bootstrap Error - 'Original' Not Found

I am trying to bootstrap the standard errors of the parameter estimates in a glm, and I'm having a little trouble with the bootstrap step. I have defined my function as follows... boot.fn=function(data,index){ …
user42719
  • 41
  • 1
  • 3
0
votes
0 answers

Functions and GLMs in R

I'm a relatively new R user, and I'm trying to create a function to be used in a bootstrap of standard errors in a GLM in R. If I run the GLM by itself like this... glm(glm.formula, family = tweedie(var.power=1.5,link.power=0), …
user42719
  • 41
  • 1
  • 3
0
votes
0 answers

R codes for Poisson Gamma mixture distribution

I have already estimated my parameters namely mu, power variance, dispersion , power, shape and scale parameters of Gamma, i have claims data and i want to fit a Compound Poisson Gamma in R, how do i proceed from here? i have done a little bit of…
user40494
  • 101
  • 1
0
votes
1 answer

modelling claim loss using tweedie distribution in R

i want to fit a tweedie compound Poisson Gamma to my loss data using ptweedie.series R command. I am getting problems how to start with my fitting in R. Thanks in advance.
0
votes
1 answer

r: 2 subset function, 2nd works but 1st don't

I am trying to write my own function. There are 2 subset functions used to delete part of the data. The 2nd subset function works, but 1st one fails. I checked the class and level of the field that is used to subset the data, and everything seems…
user2037892
  • 79
  • 2
  • 8
1 2
3