Product: TIBCO Spotfire®
Regression Modeling with a logarithmic term
If a linear regression model (generated using "Tools > Linear Regression..") contains a "log(x)" term, which of the functions in the Spotfire expression language should be used when building a calculated column that uses this logarithmic term?
When a linear regression model contains a "log(x)" term, the Spotfire expression language's "Ln()" function should be used in generating a calculated column that uses this logarithmic term.
Explanation:
In the background, the "Tools > Linear Regression..." feature in the Spotfire desktop client's main menu is implemented using a Spotfire data function that calls the Spotfire desktop client's built-in TIBCO Enterprise Runtime for R (TERR) statistical engine. In TERR, the log() function is the natural logarithm, the log10() function is the base-10 logarithm, and the logb() function is the user-defined-base logarithm, as shown in the following examples.
>
> log( 10 )
[1] 2.302585
>
>
> log10( 10 )
[1] 1
>
>
> logb( 10, 2 )
[1] 3.321928
>
In the expression language used for calculated columns in Spotfire itself, the corresponding functions are Ln() for the natural logarithm, Log10() for the base-10 logarithm, and Log() for the user-defined-base logarithm. If the natural logarithm of the [x] column was used in the model (using TERR's log() function), the calculated column must also use the natural logarithm of the [x] column (using Spotfire's Ln() function).
Comments
0 comments
Article is closed for comments.