PL/SQL Least Squares
435856Aug 30 2007 — edited Aug 30 2007Hi,
I am looking for an example of the least squares linear regression function in sql or pl/sql to generate the next value in sequence.
eg. table
month| amt
-----------------
1 | 5
2 | 7
3 | 9
3 | 8
4 | 11
5 | 7
what is the estimated amt for month 6?
I have no problem generating a cursor from the table or an array if required. I having no statistical background and find the oracle instructions to be too technical for me without examples.
If anyone has played with this in their work, a point at the correct Oracle package and program/function would be greatly appreciated. An example would be a godsend.