Hello,
I was wondering if there was a way to calculate the linear regression slope of column data within a data table formula.
A simple example of the table is below. The data is ordered and I would like to calculate the slope of a fit line of volume over time using the current row's data and previous points to perform the regression.
The idea is that I would like to see the how the calculated slope changes with increasing the number of data points. From doing this manually, the slope values end up approaching a given value and stay within +/-5% after 20 or so points.
| Instance | Time (s) | Volume (mL) | Slope (mL/s) |
| 1 | 0 | 0 | n/a |
| 2 | 5 | 0.5 | m1 |
| 3 | 10 | 0.8 | m2 |
| ... | ... | ... | ... |
| N | T | V | mN-1 |
If that is possible, my next challenge would be to set this up so that I can calculate the slope formula so that it uses N data points on either side of the current row for a symmetrical moving calculation instead.
Thank you in advance.