linear Regression Raw R Algorithm

Since the most general definition of the coefficient of determination is also known as the Nash – Sutcliffe model efficiency coefficient, this last notation is preferred in many fields, because denoting a goodness-of-fit indicator that can vary from −∞ to 1 (i.e., it can yield negative values) with a squared letter is confusing. One class of such cases includes that of simple linear regression where r2 is used instead of R2. The creation of the coefficient of determination has been ascribed to the geneticist Sewall Wright and was first published in 1921.

linear Regression Raw R source code, pseudocode and analysis