Kurtosis: Compute the Kurtosis

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Provides three methods for performing kurtosis test.

Usage

1
Kurtosis(x, na.rm = FALSE, type = 3)

Arguments

x

a numeric vector

na.rm

a logical value for na.rm, default is na.rm=FALSE.

type

an integer between 1 and 3 selecting one of the algorithms for computing kurtosis detailed below

Details

Kurtosis measures the peakedness of a data distribution. A distribution with zero kurtosis has a shape as the normal curve (mesokurtic, or mesokurtotic). A positive kurtosis has a curve more peaked about the mean and the its shape is narrower than the normal curve (leptokurtic, or leptokurtotic). A distribution with negative kurtosis has a curve less peaked about the mean and the its shape is flatter than the normal curve (platykurtic, or platykurtotic).

Value

An object of the same type as x.

Note

To be consistent with classical use of kurtosis in political science analyses, the default type is the same equation used in SPSS and SAS, which is the bias-corrected formula: Type 2: G_2 = ((n + 1) g_2+6) * (n-1)/(n-2)(n-3). When you set type to 1, the following equation applies: Type 1: g_2 = m_4/m_2^2-3. When you set type to 3, the following equation applies: Type 3: b_2 = m_4/s^4-3 = (g_2+3)(1-1/n)^2-3. You must have at least 4 observations in your vector to apply this function.

Skewness and Kurtosis are functions to measure the third and fourth central moment of a data distribution.

Author(s)

Daniel Marcelino, dmarcelino@live.com

References

Balanda, K. P. and H. L. MacGillivray. (1988) Kurtosis: A Critical Review. The American Statistician, 42(2), pp. 111–119.

Examples

1
2
3
4
5
6
w<-sample(4,10, TRUE)
x <- sample(10, 1000, replace=TRUE, prob=w)

Kurtosis(x, type=1)
Kurtosis(x, type=2)
Kurtosis(x)

SciencesPo documentation built on May 29, 2017, 9:28 p.m.