On Wed, Oct 12, 2011 at 4:56 AM, ivo welch <ivo.we...@gmail.com> wrote: > thanks, josh. in my posting example, I did not need anything except > coefficients. (when this is the case, I usually do not even use > lm.fit, but I eliminate all missing obs first and then use solve > crossprod(y,cbind(1,x)) crossprod(cbind(1,x)).) this is pretty fast.)
solve(cbind(1,x), y) should be even faster, and more numerically stable, [and less likely to make certain people want to cast you into the outer darkness, where there is SAS and gnashing of teeth] > alas, I will need to figure how to get coef standard errors faster in > this case. summary.lm() is really slow. The code from summary.lm that actually computes the standard errors is fairly efficient; you could extract that. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.