Hi, I'm trying to fit a glm with a negative binomial error distribution and a log link, using the example found in the paper Stochastic Claims Reserving In General Insurance by England and Verrall. I am attaching a pdf since it is more difficult to write equations in here. So to hopefully explain myself better I wrote a pdf, where I'm explaining what I need to do and where I got stuck. (I tried to be clear as possible). Thanks in advance for any help Stefani -------------- next part -------------- A non-text attachment was scrubbed... Name: Microsoft Word - Negative Binomial.pdf Type: application/pdf Size: 72741 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100105/aa3f8521/attachment.pdf>
Negative binomial
3 messages · Stefani Mallia, David Winsemius
On Jan 5, 2010, at 9:38 AM, Stefani Mallia wrote:
Hi, I'm trying to fit a glm with a negative binomial error distribution and a log link, using the example found in the paper Stochastic Claims Reserving In General Insurance by England and Verrall. I am attaching a pdf since it is more difficult to write equations in here. So to hopefully explain myself better I wrote a pdf, where I'm explaining what I need to do and where I got stuck. (I tried to be clear as possible).
In your attachment you suggest (I think) that the ordering of levels of the dev factor may be the problem. The methods of rearranging those levels in R has always been a bit of a mystery to me, but you may get useful information with: levels(mack$dev) and you may need to do something like: mack$dev <- relevel(mack$dev, ref="dev1")
Thanks in advance for any help Stefani <Microsoft Word - Negative Binomial.pdf>
David Winsemius, MD Heritage Laboratories West Hartford, CT
On Jan 5, 2010, at 12:20 PM, David Winsemius wrote:
On Jan 5, 2010, at 9:38 AM, Stefani Mallia wrote:
Hi, I'm trying to fit a glm with a negative binomial error distribution and a log link, using the example found in the paper Stochastic Claims Reserving In General Insurance by England and Verrall. I am attaching a pdf since it is more difficult to write equations in here. So to hopefully explain myself better I wrote a pdf, where I'm explaining what I need to do and where I got stuck. (I tried to be clear as possible).
In your attachment you suggest (I think) that the ordering of levels of the dev factor may be the problem. The methods of rearranging those levels in R has always been a bit of a mystery to me, but you may get useful information with: levels(mack$dev) and you may need to do something like: mack$dev <- relevel(mack$dev, ref="dev1")
Actually that is probably wrong, since I was reading the level label off the output of the model which is not how htat factor is constructed. So it is more likely to work correctly with: mack$dev <- relevel(mack$dev, ref="1") # still untested
David > > >> >> Thanks in advance for any help >> >> Stefani >> >> >> <Microsoft Word - Negative Binomial.pdf> > > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius, MD Heritage Laboratories West Hartford, CT