Description Usage Arguments Details Examples
Transform the raw, central or normalized statistical moments between them.
1 2 | convert.moments(data, from = c("raw", "central", "normalized"),
to = c("raw", "central", "normalized"), eta = NULL)
|
data |
data.frame containing statistical moments. |
from |
What type of statistical moments do we have in input |
to |
What type of statistical moments do you want to obtain?
Three types of moments can be obtained: |
eta |
A numeric vector of the expected values. This is required ONLY
is we convert central moments into raw or normalized. Default: |
Wikipedia: In probability theory and statistics, the standardized moment of a probability distribution is a moment (normally a higher degree central moment) that is normalized. The normalization is typically a division by an expression of the standard deviation which renders the moment scale invariant. This has the advantage that such normalized moments differ only in other properties than variability, facilitating e.g. comparison of shape of different probability distributions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # raw moments
RM <- c(1, 68.75099, 4991.724, 371531.9, 28199680,
2176435499, 170477697491)
CM1 <- convert.moments(RM, from = "raw", to = "central") # raw to central
NM1 <- convert.moments(RM, from = "raw", to = "normalized") # raw to normalized
CM2 <- convert.moments(NM1, from = "normalized", to = "central")
RM2 <- convert.moments(NM1, from = "normalized", to = "raw")
RM3 <- convert.moments(CM2, from = "central", to = "raw", eta = 68.75099)
NM3 <- convert.moments(CM2, from = "central", to = "normalized", eta = 68.75099)
# The resulted error following multiple conversions is negligible
sum(RM - RM3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.