Skip to content
Prev 980 / 12125 Next

[R-pkg-devel] Recommendation on qr method export

Not strictly what you're asking, but at some point it may be important to note that the "QR" method used by lm() and friends (notably anova() and aov()) actually relies on successive orthogonalization. This does yield a QR decomposition but the reverse is not true. A generic X=QR decomposition does orthogonalize, but it does not necessarily hold that the first k columns of Q spans the same subspace as the first k columns of X. LINPACK's QR happens to be implemented as successive orthogonalization, but LAPACK's is not, so only the former is usable with lm().

So, I suppose what I am getting at is that not even lm() uses qr(), it calls LINPACK directly.

-pd