mmd {AnthropMMD}R Documentation

Compute MMD values from a table of sample sizes and relative frequencies

Description

Compute various MMD results, typically using a table returned by the function binary_to_table with the argument relative = TRUE.

Usage

mmd(data, angular = c("Anscombe", "Freeman"), correct = TRUE,
    all.results = TRUE)

Arguments

data

A table of sample sizes and frequencies

angular

Choice of a formula for angular transformation: either Anscombe or Freeman-Tukey transformation.

correct

Boolean; whether to apply the correction for small sample sizes (should be TRUE for most use cases).

all.results

Boolean; whether to compute all four matrices described below as results. If FALSE, only the matrix MMDMatrix is computed. (This argument should be TRUE for most use cases).

Value

A list with four components:

MMDMatrix

Following the presentation adopted in many research articles, a matrix filled with MMD values above the diagonal, and standard deviations of MMD below the diagonal.

MMDSym

A symmetrical matrix of MMD values, where negative values are replaced by zeroes.

MMDSignif

A matrix where any pair of traits having a significant MMD value is indicated by a star, ‘*’.

MMDpval

A matrix filled with MMD values above the diagonal, and p-values below the diagonal.

Author(s)

Frédéric Santos, frederic.santos@u-bordeaux.fr

References

de Souza, P. and Houghton, P. (1977). The mean measure of divergence and the use of non-metric data in the estimation of biological distances. Journal of Archaeological Science, 4(2), 163–169. doi: 10.1016/0305-4403(77)90063-2

Harris, E. F. and Sjøvold, T. (2004) Calculation of Smith's mean measure of divergence for intergroup comparisons using nonmetric data. Dental Anthropology, 17(3), 83–93.

Nikita, E. (2015) A critical review of the mean measure of divergence and Mahalanobis distances using artificial data and new approaches to the estimation of biodistances employing nonmetric traits. American Journal of Physical Anthropology, 157, 284–294. doi: 10.1002/ajpa.22708

See Also

start_mmd

Examples

## Load and visualize a binary dataset:
data(toyMMD)
head(toyMMD)

## Convert this dataframe into a table of sample sizes and relative
## frequencies:
tab <- binary_to_table(toyMMD, relative = TRUE)
tab

## Compute and display a symmetrical matrix of MMD values:
mmd_out <- mmd(tab, angular = "Anscombe")
mmd_out$MMDSym

## Significant MMD values are indicated by a star:
mmd_out$MMDSignif

[Package AnthropMMD version 4.0.3 Index]