powered by
Uses numerical integration to compute the theoretical raw or central moments of the specified distribution.
moments( dist, distarg, p0 = 0, raw = TRUE, central = TRUE, coef = TRUE, distbounds = c(-Inf, Inf), order = 1:4 )
a named list with zero or more of:
m
raw moments
mu
central moments
coefficients
CV, skewness, kurtosis
character; distribution name (e.g. "norm", "paretoII")
"norm"
"paretoII"
list of distribution arguments
numeric; probability zero (default 0)
logical; compute raw moments?
logical; compute central moments?
logical; compute standardised coefficients (CV, skewness, kurtosis)?
numeric vector of length 2; distribution bounds (default c(-Inf, Inf))
c(-Inf, Inf)
integer vector; raw moment orders (default 1:4)
1:4
sample.moments, populationstat
sample.moments
populationstat
library(CoSMoS) ## Normal distribution moments("norm", list(mean = 2, sd = 1)) ## Pareto type II moments(dist = "paretoII", distarg = list(shape = 0.2, scale = 1))
Run the code above in your browser using DataLab