Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL REGR_INTERCEPT Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: REGR_INTERCEPT

Definition:
In Oracle PL/SQL, REGR_INTERCEPT is a linear regression analytic function which takes two numeric inputs and returns the y-intercept of the regression line according to the calculation shown below:

AVG(x) - REGR_SLOPE( x, y) * AVG( y )

Note that the pairs having any argument's value as NULL are eliminated, but the final result might be NULL as per the above computation.

Example Syntax:

REGR_INTERCEPT(x,y)


In the syntax, 'x' is referred to as the dependent variable and 'y' is referred to as the independent variable of the Regression Line.

Example Usage:

sql> SELECT deptno, sal, REGR_INTERCEPT(sal, deptno) OVER (partition by deptno) "REGR_INTERCEPT"
FROM employee



Related Links:

Related Code Snippets:
  • REGR_INTERCEPT - REGR_INTERCEPT returns the y-intercept of the regression line. After the eliminat...
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 135 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?