Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I have just found out that these OLAP functions (introduced in v9.0.2) are very handy to do linear regression tests, namely REGR_SLOPE(), REGR_INTERCEPT() and REGR_R2(). It was much easier to do so than I had thought - being no expert in this field at all...and they seem real fast.

(A deep thanks to Glenn for the OLAP whitepaper, by the way!)

Now I would like to ask if it's possible with theses or other functions to test for other forms of regression tests, e.g. with the help of polynoms or logarithical functions - as can be done with Excel.

(Yep, I'm aware that this might be more a mathematical question...)

asked 03 Jun '11, 19:02

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 03 Jun '11, 19:06

I should add that I'm asking just to apply regresstion tests - not to understand the whole theory behind:)

So if there are quite simple ways to use the existing OLAP functions to perform different tests, I'd like to try that. Otherwise the linear approach will suffice for my needs.

(05 Jun '11, 06:05) Volker Barth

So I assume the answer is: No, there's just support for linear regression tests.

(14 Jun '11, 03:33) Volker Barth

Only linear regression of a function y = a + bx is supported by the current set of functions, but that doesn't necessarily mean that you can only use the regression functions for linear equations. For example, you might model an exponential regression y = bx**a by taking the logarithm of both sides, that is, ln y = ln b + a ln x. You could then solve for ln y using the supported linear regression functions, and take the exponent after that to determine the value of y. There are examples of doing these sorts of transformations in Raj Jain's book, referenced in the OLAP whitepaper, and there is a brief example of doing this in the capacity planning whitepaper (see Section 5.4.2).

Handling arbitrary types of regressions could be supported by user-defined aggregate and window functions, which SQL Anywhere does not currently support.

permanent link

answered 15 Jun '11, 01:13

Glenn%20Paulley's gravatar image

Glenn Paulley
accept rate: 43%

edited 15 Jun '11, 01:43

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Jun '11, 19:02

question was seen: 2,740 times

last updated: 15 Jun '11, 01:43