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
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: library(MASS) # from ?negative.binomial glm(Days ~ .^4, family = negative.binomial(1), data = quine) HTH, --sundar
Hi, The geometrical distribution is a particular case of negative binomial distribution. See in MASS try >help.search(negative.binomial) ----- Message d'origine ---- De : xzhong@nd.edu À : r-help@stat.math.ethz.ch Envoyé le : Mardi, 4 Avril 2006, 3h06mn 48s Objet : [R] about the generalized linear models 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 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html [[alternative HTML version deleted]]