Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL Least Squares

435856Aug 30 2007 — edited Aug 30 2007
Hi,

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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2007
Added on Aug 30 2007
5 comments
652 views