I'm trying to work out how you do this from first principles. The Wikipedia page on linear regression gives me enough to solve it with matrix operations through the origin but I can't find much literature on implementing an algorithm for an OLS fit returning coefficients, a t-statistic and an $r^2$ value for the fit
Can anyone point me to good reference?
Thanks