Numerical estimation of moments
Uses numerical integration to caclulate the theoretical raw or central moments of the specified distribution.
moments( dist, distarg, p0 = 0, raw = T, central = T, coef = T, distbounds = c(-Inf, Inf), order = 1:4 )
dist: distributiondistarg: list of distribution argumentsp0: probability zeroraw: logical - calculate raw moments?central: logical - calculate central moments?coef: logical - calculate coefficients (coefficient of variation, skewness and kurtosis)?distbounds: distribution bounds (default set to c(-Inf, Inf))order: vector of integers - raw moment orderslibrary(CoSMoS) ## Normal Distribution moments('norm', list(mean = 2, sd = 1)) ## Pareto type II scale <- 1 shape <- .2 moments(dist = 'paretoII', distarg = list(shape = shape, scale = scale))
Related functions from the same R package