Learn R Programming

utilities (version 0.4.0)

kurtosis: 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

Value

The sample kurtosis of the data vector/matrix

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.

Examples

Run this code
# NOT RUN {
kurtosis(rnorm(1000))
kurtosis(rexp(1000))
# }

Run the code above in your browser using DataLab