sample.moments: Sample moments

View source: R/moments.R

sample.momentsR Documentation

Sample moments

Description

Computes raw moments, central moments, and standardised coefficients (CV, skewness, kurtosis) from a numeric sample.

Usage

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

Arguments

x

numeric vector of values

na.rm

logical; strip NA values before computation?

raw

logical; compute raw moments?

central

logical; compute central moments?

coef

logical; compute standardised coefficients (CV, skewness, kurtosis)?

order

integer vector; raw moment orders (default 1:4)

Value

a named list with zero or more of:

m

raw moments

mu

central moments

coefficients

CV, skewness, kurtosis

See Also

moments, checkTS

Examples


library(CoSMoS)

x <- rnorm(1000)
sample.moments(x)

y <- rparetoII(1000, 10, .1)
sample.moments(y)


CoSMoS documentation built on May 8, 2026, 1:08 a.m.