I'm trying to estimate $p$ in tweedie regression, but I got the following message:
glm.fit: algorithm did not converge
I'm using public data from "GLMs for insurance data" book by Piet de Jong, and Gillian Z. Heller. Here is my code:
install.packages("sas7bdat") # A package to read SAS data set
library(sas7bdat)
mydata <- read.sas7bdat("http://www.businessandeconomics.mq.edu.au/our_departments/Applied_Finance_and_Actuarial_Studies/acst_docs/glms_for_insurance_data/data/claims_sas_miner.sas7bdat")
View(mydata) # Viewing the data
library(tweedie)
out=tweedie.profile(mydata$CLM_AMT~1,p.vec=seq(1.1,1.9,length=9),
method="interpolation",do.ci=TRUE,do.smooth=TRUE,do.plot=TRUE) # Estimating p
Any idea?
library(statmod)
solves the problem I had. $\endgroup$ – Glen_b Nov 30 '14 at 7:16