Product:TIBCO Spotfire Analyst
Versions:All supported versions
Summary:
This article describes the steps to add a trend line into a Scatter Plot. It also describes how to display the R2 of the regression for the trend line in a label and a tooltip. It also illustrates how use of categorical axes instead of continuous axes can change the trend line, its equation, and its R2 value.
Details:
What are the steps to put a trend line into a Scatter Plot?
Resolution:
Versions:All supported versions
Summary:
This article describes the steps to add a trend line into a Scatter Plot. It also describes how to display the R2 of the regression for the trend line in a label and a tooltip. It also illustrates how use of categorical axes instead of continuous axes can change the trend line, its equation, and its R2 value.
Details:
What are the steps to put a trend line into a Scatter Plot?
Resolution:
The following steps demonstrate one way to put a trend line into a Scatter Plot:
(1) Right-click on the Scatter Plot.
(2) In the context-sensitive menu, select Properties.
(3) In the left pane of the Properties dialog, select Lines & Curves.
(4) In the "Visible lines and curves" field at the top of the "Lines & Curves" dialog, put a check in the checkbox for "Straight Line Fit: Straight line".
(5) In the Properties dialog, press the "Close" button to close the dialog.
This example uses a simple straight line fit, but you can find more curve fit models under the "Add" button in the "Lines & Curves" dialog. For more information, please refer to the page "Curve Fit Models" in the TIBCO Spotfire Analyst User's Guide: https://docs.tibco.com/pub/sfire-analyst/11.4.0/doc/html/en-US/TIB_sfire-analyst_UsersGuide/index.htm#t=curve%2Fcurve_curve_fit_models.htm
____________________
NOTE 1:
The R2 (R-squared) value for the linear regression fit can also be displayed in the trend line's Tooltip and Label.
(1) In the "Lines & Curves" dialog's "Visible lines and curves" region, select your "Straight Line Fit: Straight line" item.
(2) In the "Lines & Curves" dialog's "Settings" region, press the "Label and Tooltip..." button.
(3) In the "Label and Tooltip" dialog this opens, put checks in the "Label" and "Tooltip" checkboxes for "R2 of the regression (r2)", then press the dialog's OK button to close it.
(4) Press the "Lines & Curves" dialog's "Close" button to close it.
The following attached files show the "Label and Tooltip" dialog and a Scatter Plot example with trendline and R2:
"Label and Tooltip dialog.png"
"trendline with R2 in label & tooltip.png"
____________________
NOTE 2:
If the trend line result seems incorrect, it may be due to use of categorical axes in the Scatter Plot.
Use of categorical axes (instead of continuous axes) in the plot will typically change the trend line, its equation, and its R2 value.
The four Scatter Plots with trend lines in the attached "trendline, fit equation, R2 label.png" screenshot illustrate this.
The "Disp. vs Weight (continuous vs continuous)" plot in the upper left corner shows the expected result.
The "<Disp.> vs <Weight> (categorical vs categorical)" plot in the lower right corner shows the result when both the x axis and the y axis have been defined to be categorical axes.
The other two plots show results obtained when one axis is continuous and the other axis is categorical.
Note that a continuous axis shows equally spaced values for its tick-mark labels (such as 100, 150, 200, 250, 300), while a categorical axis will show selected values from the actual data set (such as 89, 109, 122, 141, 163, 202).
Comments
0 comments
Article is closed for comments.