as.centsums | R Documentation |
Convert data to a centsums
object.
as.centsums(
x,
order = 3,
na.rm = TRUE,
wts = NULL,
check_wts = FALSE,
normalize_wts = FALSE
)
## Default S3 method:
as.centsums(
x,
order = 3,
na.rm = TRUE,
wts = NULL,
check_wts = FALSE,
normalize_wts = FALSE
)
x |
a numeric, array, or matrix. |
order |
the order, defaulting to |
na.rm |
whether to remove |
wts |
an optional vector of weights. Weights are ‘replication’
weights, meaning a value of 2 is shorthand for having two observations
with the corresponding |
check_wts |
a boolean for whether the code shall check for negative weights, and throw an error when they are found. Default false for speed. |
normalize_wts |
a boolean for whether the weights should be
renormalized to have a mean value of 1. This mean is computed over elements
which contribute to the moments, so if |
Computes the raw sums on data, and stuffs the results into a
centsums
object.
A centsums object.
The moment computations provided by fromo are numerically robust, but will often not provide the same results as the 'standard' implementations, due to differences in roundoff. We make every attempt to balance speed and robustness. User assumes all risk from using the fromo package.
Steven E. Pav shabbychef@gmail.com
set.seed(123)
x <- rnorm(1000)
cs <- as.centsums(x, order=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.