Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

pAnalysis (version 1.0)

R2: R-squared

Description

Simple measure of R-squared

Usage

R2(x, y)

Arguments

x
a vector of real numbers
y
a vector of real numbers; must be the same length as x

Value

  • R2 output is a number between 0 and 1

Examples

Run this code
x=c(1,2,3,4,5,6)
 y=c(1.2, 2.1, 2.9, 3.9, 5.3, 6.0)
 r2 <- R2(x,y)

Run the code above in your browser using DataLab