What algorithm is R using to calculate mean?

后端 未结 2 2014
执念已碎
执念已碎 2020-12-28 16:39

I am curious to know what algorithm R\'s mean function uses. Is there some reference to the numerical properties of this algorithm?

I found the following C code in s

2条回答
  •  孤独总比滥情好
    2020-12-28 17:11

    I'm not sure what algorithm this is, but Martin Maechler mentioned the updating method of West, 1979 in response to PR#1228, which was implemented by Brian Ripley in R-2.3.0. I couldn't find a reference in the source code or version control logs that listed the actual algorithm used. It was implemented in cov.c in revision 37389 and in summary.c in revision 37393.

提交回复
热议问题