From: Kevin J Emerson <kemerson_at_darkwing.uoregon.edu>

Date: Wed 06 Jul 2005 - 06:08:29 EST

Date: Wed 06 Jul 2005 - 06:08:29 EST

I have a question about logistic regressions.

An example. Consider the following data:

"tmp" <-

structure(list(x = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14), yes = c(0, 0, 0, 2, 1, 14, 24, 15, 23, 18, 22, 20, 14, 17
), no = c(94, 101, 95, 80, 81, 63, 51, 56, 30, 38, 31, 18, 21,
20)), .Names = c("x", "yes", "no"), row.names = c("1", "2", "3",

"4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14"), class =

"data.frame")

where x is the independent variable, and yes and no are counts of events. plotting the data you can see that the data seem to reach an asymptote at around y=0.5. using glm to fit a logistic regression it is easily seen that it does not fit well.

tmp.glm <- glm(cbind(yes,no) ~ x, data = tmp, family = binomial(link =
logit))

plot(tmp.glm$fitted, type = "l", ylim = c(0,1))
par(new=T)

plot(tmp$yes / (tmp$yes + tmp$no), ylim = c(0,1))

Any suggestions would be greatly appreciated.

Cheers,

Kevin

-- ------------------------------------ ------------------------------------ Kevin J Emerson Center for Ecology and Evolutionary Biology 1210 University of Oregon University of Oregon Eugene, OR 97403 kemerson@darkwing.uoregon.edu ______________________________________________ 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.htmlReceived on Wed Jul 06 06:13:43 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:33:16 EST
*