pgfplots icon indicating copy to clipboard operation
pgfplots copied to clipboard

Calculate/expose correlation coefficient

Open josephwright opened this issue 3 years ago • 1 comments

Using create col/linear regression = {y = ...} one can carry out linear regression in pgfplots(table), and get the slope and intercept from \pgfplotstableregressiona and \pgfplotstableregressionb. However, the correlation coefficient is not calculated. I can see that this might not always be desirable, as it's an optional piece of work, but as it uses some of the same intermediate values as the core regression work, it would be nice to have as an optional step.

The reason for the request is that typically if you want to extract the slope and intercept, you are also likely to want to comment on the quality of the fit in numerical terms.

josephwright avatar Nov 11 '21 07:11 josephwright

I don't think that Christian will invest time in the near future. So if you have good idea on how to implement it, we'll be happy to accept a PR :)

Mo-Gul avatar Jan 04 '22 20:01 Mo-Gul