Skip to content

Is it possible to add a linear regression line? #2602

Answered by texodus
mhkeller asked this question in Q&A
Discussion options

You must be logged in to vote

It is not ergonomic to calculate a linear regression in Perspective currently, though this can be done with vlookup() and a for loop if all of your Table's indices can be easily iterated over. It is also difficult to plot one if you calculate the parameters independently due to bugs/misbehavior - e.g. "Y Line" and "Y Scatter" seem to erroneously set float columns as category axes when used in the Group By position, though it is easy to calculate e.g. a * "Sales" + b linear regression from the column "Sales" with known a and b.

This is not out of scope though. We can conquer this in a number of ways, but e.g. Candlestick charts calculate a moving average window independently already, which…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mhkeller
Comment options

Answer selected by mhkeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants