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
| Parameter | Type |
|---|---|
x | ArrayLike<number> |
y | ArrayLike<number> |
opts | { band?: number; points?: number; } |
opts.band? | number |
opts.points? | number |