OK, I have found that most of the code is in
sc/source/core/tool/interpr*.cxx, especially in interpr3.cxx and
interpr5.cxx. I do know some C++, but unfortunately have very limited
time (I also work hard on the statistical wiki page,
http://wiki.services.openoffice.org/wiki/Statistical_Data_Analysis_Tool
, the Chart reimplementation
http://wiki.services.openoffice.org/wiki/Chart2, and the Bibliographic
project http://wiki.services.openoffice.org/wiki/Bib-Keywords in
addition to my own work).
I will try to dwell through the code, but it is much code and also I do
NOT know what algorithm is the best. I only saw that demonstration for
variances. I will also try to gather some articles for this issue,
unfortunately the University where I work is in Romania and does not
have a subscription to most journals, so this will be a pain.
I do however use regularly the R program (www.R-project.org), which is
the gold standard (see the wiki page and this issue:
http://qa.openoffice.org/issues/show_bug.cgi?id=66589 ).
The variance seems to use the correct algorithm:
for (::std::vector<double>::size_type i = 0; i < n; i++)
vSum += (values[i] - vMean) * (values[i] - vMean);
(though I do not know if there are even better algorithms).
What I can do, is:
- create some test-cases
- test a test case against R (especially this!!!)
- lobbying for R-integration (especially for more advanced statistical
functions)
Kind regards,
Leonard Mada
# PS
# THIS IS FOR DOCUMENTATION PURPOSES ONLY
interpr1.cxx
VARIANCE/ STD DEV
ScInterpreter::ScStDev(), ::... (other)
variance code actually in void ScInterpreter::GetStVarParams()
uses ::rtl::math::approxSub(), too
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]