pgfplots
pgfplots copied to clipboard
Calculate/expose correlation coefficient
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.
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 :)