Skip to content

Function: linearTrend()

ts
function linearTrend(
   x, 
   y, 
   opts?): Trend;

Defined in: stats/regression.ts:75

Sample a linear fit across the data range, with an optional ±k·stderr band. points controls the resolution (2 is enough for the line itself).

Parameters

ParameterType
xArrayLike<number>
yArrayLike<number>
opts{ band?: number; points?: number; }
opts.band?number
opts.points?number

Returns

Trend

MIT licensed. WebGL2 required.