[R] Negative binomial
David Winsemius
dwinsemius at comcast.net
Tue Jan 5 19:13:24 CET 2010
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
More information about the R-help
mailing list