[R] Glm and user defined variance functions
craig.lyon at rogers.com
Wed Mar 14 20:35:18 CET 2012
I am trying to run a generalized linear regression using a negative binomial
error distribution. However, I want to use an overdispersion parameter that
varies (dependent on the length of a stretch of road) so glm.nb will not do.
>From what I've read I should be able to do this using GLM by specifying my
own quasi family and describing the variance function using varfun, validmu,
dev.resids and initiate. However I cannot find any detailed discussion of
this method. Any help would be appreciated.
ps I've done this in SAS so I know it should be possible!
More information about the R-help