kurtosis: Sample Kurtosis

View source: R/kurtosis.R

kurtosisR Documentation

Sample Kurtosis

Description

kurtosis returns the sample kurtosis of a data vector/matrix

Usage

kurtosis(x, kurt.type = NULL, kurt.excess = FALSE, na.rm = FALSE)

Arguments

x

A data vector/matrix

kurt.type

The type of kurtosis statistic used ('Moment', 'Fisher Pearson' or 'Adjusted Fisher Pearson')

kurt.excess

Logical value; if TRUE the function gives the excess kurtosis (instead of raw kurtosis)

na.rm

Logical value; if TRUE the function removes NA values

Details

This function computes the sample kurtosis for a data vector or matrix. For a vector input the function returns a single value for the sample kurtosis of the data. For a matrix input the function treats each column as a data vector and returns a vector of values for the sample kurtosis of each of these datasets. The function can compute different types of kurtosis statistics using the kurt.type input.

Value

The sample kurtosis of the data vector/matrix

Examples

kurtosis(rnorm(1000))
kurtosis(rexp(1000))

utilities documentation built on July 1, 2022, 9:06 a.m.