bimodality_sarle: Sarle's Bimodality Coefficient

View source: R/bimodality.R

bimodality_sarleR Documentation

Sarle's Bimodality Coefficient

Description

Sarle's bimodality coefficient.

Usage

bimodality_sarle(x, bs.iter = 1, type = "Sarle.finite.sample")

Arguments

x

Data vector for which bimodality will be quantified

bs.iter

Bootstrap iterations

type

Score type ('Sarle.finite.sample' or 'Sarle.asymptotic')

Details

The coefficient lies in (0, 1).

The 'Sarle.asymptotic' version is defined as

b=(g^2 + 1) / k

. This is coefficient of bimodality from Ellison AM Am. J. Bot. 1987, for microbiome analysis it has been used for instance in Shade et al. 2014.

The formula for 'Sarle.finite.sample' (SAS 2012):

b=\frac{g^2 + 1}{k + (3(n-1)^2)/((n-2)(n-3))}

where n is sample size and

In both formulas, g is sample skewness and k is the kth standardized moment (also called the sample kurtosis, or excess kurtosis).

Value

Bimodality score

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

References

  • Shade et al. mBio 5(4):e01371-14, 2014.

  • Ellison AM (1987) Am J Botany 74(8):1280-1288.

  • SAS Institute Inc. (2012). SAS/STAT 12.1 user's guide. Cary, NC.

  • To cite the microbiome R package, see citation('microbiome')

See Also

Check the dip.test from the DIP package for a classical test of multimodality.

Examples

# b <- bimodality_sarle(rnorm(50), type='Sarle.finite.sample')

microbiome/microbiome documentation built on Aug. 22, 2023, 7:12 a.m.