Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Hi Raymond, I'm conflicted by this. Regression through the origin is clearly a thing which is often desired. In that sense, I'm happy to see it added, and thank you. But on the other hand, this may open a can of worms that I personally don't feel entirely competent to deal with. Are you happy to hold off a few days while I consult with some statistics experts? - There is some uncertainty as to the correct method of calculation, with many stats packages giving different results for the same data, e.g. https://web.ist.utl.pt/~ist11038/compute/errtheory/,regression/regrthroughorigin.pdf - Forcing the intercept through the origin is a dubious thing to do, even if you think it is theoretically justified, see for example the above paper, also: https://dynamicecology.wordpress.com/2017/04/13/dont-force-your-regression-through-zero-just-because-you-know-the-true-intercept-has-to-be-zero/ https://www.theanalysisfactor.com/regression-through-the-origin/ - Regression through the origin needs a revised calculation for the coefficient of determination (Pearson's R squared): https://pubs.cif-ifc.org/doi/pdf/10.5558/tfc71326-3 https://www.researchgate.net/publication/283333191_Re-interpreting_R-squared_regression_through_the_origin_and_weighted_least_squares but it's not clear how to revise the calculation, with some methods giving R squared negative or greater than 1. - Regression through the origin is only one of a number of variants of least-squares linear regression that we might also wish to offer, e.g. intercept-only, Deming or orthogonal regression. https://en.wikipedia.org/wiki/Deming_regression ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45766> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com