<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Libreoffice Calc Trendline R^2 value calculation goes wrong when trendline is forced through 0"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=127517#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Libreoffice Calc Trendline R^2 value calculation goes wrong when trendline is forced through 0"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=127517">bug 127517</a>
from <span class="vcard"><a class="email" href="mailto:ouyang.leyan@hotmail.com" title="Leyan <ouyang.leyan@hotmail.com>"> <span class="fn">Leyan</span></a>
</span></b>
<pre>I had a look in the code, this is deliberate. A specific computation was
introduced to reproduce the behavior of the LINEST function, by replacing the
difference to the average by the difference to the constant to intercept:
* The original bug is here:
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - EDITING: R^2 calculation of trendline with forced intercept is not correct"
href="show_bug.cgi?id=73374">https://bugs.documentfoundation.org/show_bug.cgi?id=73374</a>
* The commit made to solve it is here:
<a href="https://github.com/LibreOffice/core/commit/9e67015be6e9e53e19466117d692de17c18463da">https://github.com/LibreOffice/core/commit/9e67015be6e9e53e19466117d692de17c18463da</a>
The LINEST function also gives R2=0.985148.
In Excel (Office365), the LINEST function answers 0.985148 and the chart R2 is
0.9373.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>