Regr_R2



This function calculates the coefficient of determination. Pairs with NULL values are discarded.

Syntax:

Regr_R2(Y, X)

Parameters:

  • Y. Type: Number.
  • X. Type: Number.

Return value:

  • NULL if Var_Pop(X)=0;

  • 1 if Var_Pop(Y)=0 and Var_Pop(X)<>0;

  • POW(Corr(Y,X),2) if Var_Pop(Y)>0 and Var_Pop(X)<>0.

Example:

X

Y

1

7

2

1

3

2

4

5

5

7

6

34

7

32

8

43

9

87

SELECT Regr_R2(Y, X) FROM Table

Result:

0.740109464

Next page: Regr_AvgX

Be the first to know tips & trick on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.