[R] about the generalized linear models

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Tue Apr 4 04:58:44 CEST 2006

xzhong at nd.edu wrote:
> Hello,
> I'm writng this message to see if anyone knows how to analyze a data with
> geometrically distributed outcome.
> My situation now is : I have a outcome which is geometrically distributed. And
> I've also self-derived the link function for geometric distribution. I want to
> use generalized linear models to analyze it, but there're only models for
> binary data, poisson distributed data,.... I couldn't find any models for
> geometrically distributed data. Does anybody happen to know a package or some
> way of analyzing this type of data?
> Thanks!
> Best regards!
> Xiaoling

Hi, Xiaoling,

Since the geometric distribution is a special case of the negative 
binomial you should be able to use glm.nb in the MASS package. Or, if 
your really believe your data are geometric (i.e. theta is fixed at 1), 
you can use:

# from ?negative.binomial
glm(Days ~ .^4, family = negative.binomial(1), data = quine)



More information about the R-help mailing list