REGR . . .
REGR_regr_type(expr1,expr2) [OVER (analytic_clause)]
Computes the least-squares regression line to a set of number pairs returned by expr1 and expr2.
Parameters
- regr_type
May be any one of the following:
- SLOPE
Returns the slope of the line.
- INTERCEPT
Returns the Y intercept of the line.
- COUNT
Returns the number of non-NULL pairs used to calculate the line.
- R2
Returns the coefficient of determination (also known as the Chi-Squared or Goodness of Fit) for the line.
- AVGX
Returns the average of the independent variable (expr2) of the line after eliminating NULL values. The returned value can be NULL.
- AVGY
Returns the average of the dependent variable (expr1) of the line after eliminating NULL values. The returned value can be NULL.
- SXX
Computes the value of REGR_COUNT (expr1,expr2) * VAR_POP(expr2) after elimination of NULL expr1,expr2 pairs.
- SYY
Computes the value of REGR_COUNT expr1,expr2) * VAR_POP(expr1, expr2) after elimination of NULL expr1,expr2 pairs.
- SXY
Computes the value of REGR_COUNT (expr1,expr2) * VAR_POP(expr1,expr2) after elimination of NULL expr1,expr2 pairs.