I have an $N \times N$ correlation matrix. From this, I want to calculate all $N$ (squared) coefficients of multiple correlation. How can I do this efficiently?
Wikipedia has a formula that can tell me any individual coefficient, but each one requires inverting an $(N-1) \times (N-1)$ matrix, which seems rather cumbersome to do for large values of $N$.
The answer to this question has an explicit formula specifically for the case of three variables that does not seem to do any matrix inversions, but it's not obvious to me how this scales.
Relatedly: why is the squared multiple correlation coefficient not simply the sum of partial correlations? I understand the partial correlation between A and B to be the fraction of the variance in A (or B) that is not explained by (C, D, ...) that is explained by B (or A). So I would expect that the sum of all partial correlations (A,B), (A,C), (A, D), ... to be the fraction of A's variance that is explained by any of (B, C, D, ...), which sounds like the square of the coefficient of multiple correlation to me.