r-square
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

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

/r-square/

    Package Sidebar

    Install

    npm i r-square

    Weekly Downloads

    2

    Version

    1.2.0

    License

    ISC

    Unpacked Size

    3.48 kB

    Total Files

    6

    Last publish

    Collaborators

    • yogiwisesa