[R] set Gamma parameters in glm model

Ben Bolker bbolker at gmail.com
Wed Dec 8 14:53:55 CET 2010


Rosario Garcia Gil <M.Rosario.Garcia <at> slu.se> writes:

> 
> Hello
> 
> I hope my question makes sense. It is possible to specify the shape
paramenters in a glm model with family Gamma?
> 

  It doesn't look that way, but you can do a Gamma model with
a specified shape parameter (albeit much less efficiently) via

library(bbmle)
mle2(response~dgamma(scale=(1/invmu)/a,shape=a),
    parameters=list(invmu~pred1+pred2+...),
    start=list(mu=1,shape=0),
    data=...)



More information about the R-help mailing list