mu4: mu4

View source: R/mu4.R

mu4R Documentation

mu4

Description

A function to compute the unbiased sample central fourth moment.

Usage

mu4(x, na.rm = FALSE)

Arguments

x

A numeric vector of at least length 4.

na.rm

This parameter controls whether NA values are removed from the data prior to calculation. Default is FALSE.

Details

The function mu4 computes the unbiased sample central moment of a given vector. The input must numeric (as determined by is.numeric) and of length at least 4 (excluding NA's. If na.rm is TRUE, the NA entries in the given vector will be ignored.

Value

The calculated moment.

Examples

x <- c(1:5)
mu4(x)


yelleKneK/SMSD documentation built on Nov. 23, 2022, 6:40 p.m.