apaOLS.R2(X, Y)
Excel
=apaOLS.R2(X, Y)Result
Returns the R-squared of an OLS regression. If there is more than one Y variable, returns the results for all Y_i with the same X.
Syntax
X: nRows x nCols matrix of X variables. Each column contains one variable.
Y: nRows x nCols matrix of the Y variables. If there is more than one Y variable, gives results for all Y_i with the same X.
Algorithm
are the fitted values.
Remarks
There exist different approaches to calculating R-squared. The method chosen here makes R-squared independent of any constant values.
