Computes sample central moments up to a given order and the
first moment from the origin
Usage
sample.centralmoments(x, w = rep(1, length(x)), order=4)
Arguments
x
a vector of sample values
w
an optional vector of weights
order
the maximal order of the central moments to
be computed; it must be a positive integer (default value 4)
Value
A vector containing the first sample central moments,
in position [2:order], and the first moment from the
origin, in the first position of the returned vector
Details
NA's are allowed but removed. Averaging of appropriate
quantities is actually performed by weighted.mean
data(ais, package='sn')
mom <- sample.centralmoments(ais[,"bmi"])
st.cumulants.inversion(cum=c(mom[1:3], mom[4]-3*mom[2]^2))
# parameters of the fitted ST distribution