Skip to content

yogiw/r-square

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published