1.2.0 • Published 2 years ago

r-square v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

R Squared

R-squared (R2) is a statistical measure that represents the proportion of the variance for a dependent variable that's explained by an independent variable or variables in a regression model. Whereas correlation explains the strength of the relationship between an independent and dependent variable, R-squared explains to what extent the variance of one variable explains the variance of the second variable. (https://www.investopedia.com/terms/r/r-squared.asp)

Installing

Using npm:

$ npm i r-square

Usage

const x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const y = [1, 2, 3, 3, 4, 6, 7];

rSquare(x, y); // 0.94921875
1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago