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?
Issue/Introduction
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?
Environment
All supported environments
Resolution
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.
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).