# OLAP with non-linear regression tests

 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 Barth 34.9k●337●494●733 accept rate: 33% 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. answered 15 Jun '11, 01:13 Glenn Paulley 10.8k●5●76●106 accept rate: 43%
 toggle preview community wiki:

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×431
×18

question asked: 03 Jun '11, 19:02

question was seen: 1,890 times

last updated: 15 Jun '11, 01:43