When it comes to QR factorisation [Two-Stage / GS Designs]
Dear Supreme Grand Maestro,
I must confess that I'm surely not an expert in numerical Al-Gore-Rhythms optimized for speed for the solution of a general linear model fit. And my last encounter with matrices calculus is also some long years ago.
Nowadays I had only coincidences with Matratzen every night
.
And I'm surely not wise even so old.
But just some small observations from what R itself is doing:
Type in your R console
?lm.fit will give you the information that it uses a QR factorisation as the solely method for solving.
Type
Thus I highly suspect that you don't get great speed gains if you implement the whole process in FORTRAN or C by yourself.
❝ PS: Any wise guy wanting to tell me I shouldn't find b through inversion but use a QR factorisation in stead?
I must confess that I'm surely not an expert in numerical Al-Gore-Rhythms optimized for speed for the solution of a general linear model fit. And my last encounter with matrices calculus is also some long years ago.
Nowadays I had only coincidences with Matratzen every night

And I'm surely not wise even so old.
But just some small observations from what R itself is doing:
Type in your R console
lm
without brackets (!) to see in the code that the working horse of this function is the function lm.fit()
.?lm.fit will give you the information that it uses a QR factorisation as the solely method for solving.
Type
lm.fit
(again without brackets) and notice that here the calculation burden is assigned to a call of compiled FORTRAN code via function .Fortran(...)
, namely to the LINPACK routine DQRDC as the help tells us. The rest are some native R code lines surely not important for speed.Thus I highly suspect that you don't get great speed gains if you implement the whole process in FORTRAN or C by yourself.
—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- Equations for residual sigmas ElMaestro 2011-11-18 08:11
- When it comes to QR factorisationd_labes 2011-11-18 15:44
- Potentially solved it ElMaestro 2011-11-20 18:54
- When it comes to QR factorisationd_labes 2011-11-18 15:44