Description Usage Arguments Value Note Examples
Moments describe the shape of distributions, and the four most familiar are generally known by their plebeian names: Mean, Variance, Skewness, and Kurtosis. For the further initiated, these might be recognized as the first, second, third, and fourth order moments, respectively. The potential number of orders is infinite, but only the first four are commonly taken into account.
In addition to orders, moments can be further classified into types, most commonly labelled the "Raw", "Central", and "Standardized" moments. The most familiar moments are usually not expressed in the same types. That is, the first-order moment (mean) is expressed as Raw-, the second-order (variance) as Central-, and the third- and fourth-order (skewness and kurtosis, respectively) as Standardized-type.
1 2 |
x |
A vector of numerical values (i.e., a variable). |
type |
A character vector indicating which types of moments are to be calculated. Permissible values are "raw", "central", and "standardized". The default is to compute all types. |
orders |
A numeric value indicating the number of moment orders are to be calculated for each type (e.g., 1 yields mean, 2 yields mean and variance). The default is to compute the first four moments. |
correct |
A logical value indicating whether the calculations for central- and standardized moments should take degrees of freedom into account (i.e., bias correction). |
A list of up to three elements (depending on how many moment types were asked for), each containing one entry for every type-moment order that was to be calculated.
Missing values are treated by way of na.omit
.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.