[R] A logit question?

Thomas Lumley tlumley at u.washington.edu
Mon May 6 17:36:23 CEST 2002

On Mon, 6 May 2002, [iso-8859-1] Mäkinen Jussi wrote:

> I have got few answers which has pointed out that usually logit-model is for
> a binary response (dependent) variable. And this was a part of my (obviously
> badly written) question: is it possible to regress frequency data (e.g. not
> binary response) with glm(y~x, family=binomial(link=logit))?
> glm-help says:
> <snip>...For `binomial' models the response can also be specified as a
> `factor' (when the first level denotes failure and all others success) or as
> a two-column matrix with the columns giving the numbers of successes and
> failures....<snip>
> which led me think that it can handle frequency data (grouped data) as well.

Yes. See help(esoph) for an example.

> But that should give the same result as transforming response and running
> regular OLS?

No, not at all. That can't be true, since you always have some positive
probability of getting zeroes in grouped data and these cannot be
transformed.  In addition, logistic regression correctly takes account of
the change in variance with the mean in binomial data, which the
transformation + OLS doesn't.  In prehistoric times people used to use the
logit transformation + OLS to model grouped data, because it gives quite
reasonable results if the probabilities aren't too close to 0 or 1, but
that was because they didn't have logistic regression software.

There is also a weighted linear regression model closely linked with the
logistic regression model, but the connection isn't that simple.


Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list