[R] logistic Regression with SSlogis but y == 0 ?!
pluto
merten.ehmig at web.de
Wed Jun 13 17:11:52 CEST 2012
Hello there!
I got some data with x and y values. there are some y == 0. This is a
problem for the selfstarting regression model SSlogis.
The regression works if I use a non selfstarting model. The formula is the
same. But this needs very detailed information of the starting list. I dont
have this Information all the time.
An easy solution for selfstart model could be to add 1E-100 to the y==0
values. That works fine, but the Regressioncoefficiants differ to the
original ones a bit. Sometimes this is problematic.
So I wonder if it is possible to copy the code of SSlogis and rewrite the
failing passage. I found this passage, but I dont have any Idea, where and
how to create a new "SSlogis2".
I guess this part of one SSlogis function causes the errormessage:
z <- xy[["y"]]
if (min(z) <= 0) {
z <- z - 1.05 * min(z)
}
z <- z/(1.05 * max(z))
xy[["z"]] <- log(z/(1 - z))
aux <- coef(lm(x ~ z, xy))
--
View this message in context: http://r.789695.n4.nabble.com/logistic-Regression-with-SSlogis-but-y-0-tp4633269.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list