Learn R Programming

fromo (version 0.2.4)

centsums-class: centsums Class.

Description

An S4 class to store (centered) sums of data, and to support operations on the same.

Usage

# S4 method for centsums
initialize(.Object, sums, order = NA_real_)

centsums(sums, order = NULL)

Value

An object of class centsums.

Arguments

.Object

a centsums object, or proto-object.

sums

a numeric vector.

order

the order, defaulting to length(sums)+1.

Slots

sums

a numeric vector of the sums.

order

the maximum order.

Author

Steven E. Pav shabbychef@gmail.com

Details

A centsums object contains a vector value of the data count, the mean, and the \(k\)th centered sum, for \(k\) up to some maximum order.

References

Terriberry, T. "Computing Higher-Order Moments Online." https://web.archive.org/web/20140423031833/http://people.xiph.org/~tterribe/notes/homs.html

J. Bennett, et. al., "Numerically Stable, Single-Pass, Parallel Statistics Algorithms," Proceedings of IEEE International Conference on Cluster Computing, 2009. tools:::Rd_expr_doi("10.1109/CLUSTR.2009.5289161")

Cook, J. D. "Accurately computing running variance." https://www.johndcook.com/standard_deviation/

Cook, J. D. "Comparing three methods of computing standard deviation." https://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/

Examples

Run this code
obj <- new("centsums",sums=c(1000,1.234,0.235),order=2)

Run the code above in your browser using DataLab