sample.moments function

Estimation of sample moments

Estimation of sample moments

Estimation of sample moments.

sample.moments(x, na.rm = FALSE, raw = T, central = T, coef = T, order = 1:4)

Arguments

  • x: a numeric vector of values
  • na.rm: a logical value indicating whether NA values should be stripped before the computation proceeds
  • raw: logical - calculate raw moments?
  • central: logical - calculate central moments?
  • coef: logical - calculate coefficients (coefficient of variation, skewness and kurtosis)?
  • order: vector of integers - raw moment orders

Examples

library(CoSMoS) x <- rnorm(1000) sample.moments(x) y <- rparetoII(1000, 10, .1) sample.moments(y)

Other functions in CoSMoS

Related functions from the same R package