On 25 Dec 2002, Peter Dalgaard BSA wrote: > [EMAIL PROTECTED] writes: > > > The problem is caused by exp(x) returning Inf when x is large. > > > > One way of fixing the problem [there may be better ways] would be to include the > > line > > > > out[x > 709] <- 1 > > > > in inv.logit() > > Yes, or replace the entire code with something like > > inv.logit2 <- function(x) ifelse(x > 0, 1 - 1/(1+exp(x)), 1/(1+exp(-x)))
Or use 'plogis(x)', eventually with 'lower.tail = ...' ... > > -- > O__ ---- Peter Dalgaard Blegdamsvej 3 > c/ /'_ --- Dept. of Biostatistics 2200 Cph. N > (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 > ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 > > ______________________________________________ > [EMAIL PROTECTED] mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-devel > --- Göran Broström tel: +46 90 786 5223 Department of Statistics fax: +46 90 786 6614 Umeå University http://www.stat.umu.se/egna/gb/ SE-90187 Umeå, Sweden e-mail: [EMAIL PROTECTED] ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-devel