-
Notifications
You must be signed in to change notification settings - Fork 2
Regression
Michał edited this page Jan 10, 2017
·
7 revisions
Scatterplot with regression lines and confidence intervals. Extends ScatterPlot
#Demo Online demo
Scatterplot with regression lines and confidence intervals is created with an ODCD3.Regression function:
var placeholderSelector = "#plot";
var data = [ ... ]; // array of arrays/objects
var config = { //optional config object
...
};
var plot = new ODCD3.Regression(placeholderSelector, data, config);
#Configuration
The ODCD3.Regression function extends ODCD3.ScatterPlot and takes 3 parameters:
- selector for plot placeholder element
- data to plot
- optional config object
Configuration object properties added to base ScatterPlot configuration:
- mainRegression - show regression for all data, boolean (default: true)
- groupRegression - show regression for available groups, boolean (default: true)
-
confidence - object containing confidence area configuration:
- level - confidence level, default: 0.95
-
criticalValue - function used to compute critical value, may be used to override default function:
(degreesOfFreedom, criticalProbability) => StatisticsUtils.tValue(degreesOfFreedom, criticalProbability)