Description Usage Arguments Details Value See Also Examples
Compute raw and central statistical moments of a distribution of deaths.
1 | find.moments(data, x, y = NULL, n, na.rm = TRUE)
|
data |
A data.frame or matrix containing 3 columns: Year, Age, Dx. |
x |
Vector of ages. |
y |
Numerical vector indicating the years in input |
n |
The maximum order of the moments to be computed. The order should be at least 2. |
na.rm |
Logical value. If |
If f(x) is a probability density function, then μ(n) is called
the n-th moment of the probability distribution, where:
μ(n) = \int (x-c)^n f(x)dx.
An object containing:
central.moments
— Moments about the mean (c = mean).
The zeroth moment is the total probability (i.e. one), the first moment
is zero, the second central moment is the variance, the third central moment
is the skewness (with normalization), and the fourth central moment
is the kurtosis (with normalization).
raw.moments
— Moments about zero (c = 0).
The first moment is the mean.
normalized.moments
— Normalized moments.
convert.moments
all.moments
raw2central
1 2 3 4 | x <- 0:110
y <- 1960:2016
dx <- HMD_male$dx$GBRTENW[paste(x), paste(y)]
find.moments(data = dx, x = x, y = y, n = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.