Uwe Ligges <[EMAIL PROTECTED]> writes: > plot.lm() produces the error message, in particular the lines > > hii <- lm.influence(x, do.coef = FALSE)$hat > > which appears to be 1 in some cases, and > > rs <- r.w/(s * sqrt(1 - hii)) > > (you get a division by zero and the outcome is Inf, hence it's not > possible to scale the plot any more). > > > I'd call it a bug, but I don't know what the bug really is. I'll think > about it...
If the $hat is 1, then the residual is theoretically zero and you should get 0/0 == NA which would be much less trouble. Apparently, floating poing arithmetic makes it not quite so and you get Inf in some cases. I'd expect that rs[hii==1] <- NA would fix things up, although you might possibly need a fuzz factor (hii > 1-1e-10 or so). -- 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 https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html