Calculate the bimodality coefficient for a numeric vector as specified in Pfister et al. (2013).
bimodality_coefficient(x, na.rm =FALSE)
Arguments
x: a numeric vector.
na.rm: logical specifying whether missing values should be removed.
Returns
A numeric value.
Details
The calculation of the bimodality coefficient involves calculating the skewness and kurtosis of the distribution first. For this, the skew and kurtosi functions of the psych
package are used. Note that type is set to "2" for these functions in accordance with Pfister et al. (2013).
Pfister, R., Schwarz, K. A., Janczyk, M., Dale, R., & Freeman, J. B. (2013). Good things peak in pairs: A note on the bimodality coefficient. Frontiers in Psychology, 4, 700. tools:::Rd_expr_doi("10.3389/fpsyg.2013.00700")
See Also
skew for calculating skewness and kurtosis.
mt_check_bimodality for assessing bimodality using several methods in a mousetrap data object.