-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111
The first one should be: > n <- (S+F) > share <- S/(S+F) > glm(share~x, family=quasibinomial, weights=n) This should give you results more comparable to the second one. Either way is acceptable. Hope this helps, > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Serguei Kaniovski > Sent: Tuesday, February 27, 2007 6:37 AM > To: [email protected] > Subject: [R] How to put the dependent variable in GLM proportion model > > > Hello everyone, > > I am confused about how the dependent variable should be > specified, e.g. > say S and F denote series of successes and failures. Is it > > share<-S/(S+F) > glm(share~x,family=quasibinomial) > > or > > glm(cbind(S,F)~x,family=quasibinomial) > > The two variants produce very different dispersion parameter > and deviances. > The book by Crawley, the only one R-book a have, says the > second variant is correct for proportions data. > > Serguei > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] 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. > ______________________________________________ [email protected] 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.
