moment {moments}R Documentation

Statistical Moments

Description

This function computes the sample moment of specified order.

Usage

moment(x, order = 1, central = FALSE, absolute = FALSE, na.rm = FALSE)

Arguments

x a numeric vector of data.
order order of the moment to be computed
central a logical value - if central moments are to be computed.
absolute a logical value - if absolute moments are to be computed.
na.rm a logical value - remove NA values?

Author(s)

Lukasz Komsta

Examples

set.seed(1234)
x <- rnorm(10)
moment(x)
moment(x,order=3,absolute=TRUE)

[Package moments version 0.11 Index]