[R] RE: New package: colSums
Liaw, Andy
andy_liaw at merck.com
Mon Jan 7 19:18:32 CET 2002
David,
> - colVars is very naive, e.g. I'm probably exacerbating
> roundoff error when
> mu >> sigma. I personally don't worry because in finance,
> mu (return) is
> never >> sigma (risk) :-). The S-Plus documentation for
> colVars claims they
> do something fancy with the "two-pass method described in
> Chan, Golub, and
> LeVeque (1983)" that I don't know anything about.
The formula in that paper is essentially
Sum(X-Xbar)^2 - (1/N)(Sum(X - Xbar))^2
which corrects for roundoff errors. This is quite effective, at minimal
computational cost.
Cheers,
Andy
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list