Fast pairwise simple linear regression between variables in a data frame
Some statistical result / background (Link in the picture: Function to calculate R2 (R-squared) in R) Computational details Computations involved here is basically the computation of the variance-covariance matrix. Once we have it, results for all pairwise regression is just element-wise matrix arithmetic. The variance-covariance matrix can be obtained by R function cov, but functions … Read more