plot.anthropmmd_result {AnthropMMD}R Documentation

Display a multidimensional scaling (MDS) plot with the MMD dissimilarities as input

Description

This function plots a 2D or 3D MDS to represent the MMD dissimilarities among the groups compared. Various MDS methods are proposed, and most of them are based on the R package smacof.

Usage

## S3 method for class 'anthropmmd_result'
plot(x, method = c("classical", "interval", "ratio", "ordinal"),
axes = FALSE, gof = FALSE, dim = 2, asp = TRUE, xlim = NULL, ...)

Arguments

x

An object of class anthropmmd_result, produced by the function mmd.

.

method

Specification of MDS type. classical uses the metric MDS implemented in stats::cmdscale; the three other values are passed to the R function smacof::smacofSym (see its help page for more details).

axes

Boolean: should the axes be displayed on the plot?

gof

Boolean: should goodness of fit statistics be displayed on the topleft corner of the plot? More details below.

dim

Numeric value, 2 or 3. Indicates the maximal dimension desired for the MDS plot. It should be noted that, even with dim = 3, the final solution may include only two axes.

asp

Boolean. If TRUE, the same scale is used for all axes. More details below.

xlim

Parameter passed to plot, can be NULL.

...

Other arguments possibly passed to plot.

Details

Value

This function returns no value by itself, and only plots a MDS in a new device.

Author(s)

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

References

G. Dzemyda, O. Kurasova and J. Zilinskas (2013) Multidimensional Data Visualization, Springer, chap. 2, p. 39–40.

I. Borg, P. Groenen and P. Mair (2013) Applied Multidimensional Scaling, Springer, chap. 7, p. 79.

See Also

start_mmd, stats::cmdscale, smacof::smacofSym

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 = "Freeman")

## Plot a classical metric MDS in two dimensions:
plot(x = mmd_out, method = "classical",
     axes = TRUE, gof = TRUE, dim = 2)

[Package AnthropMMD version 4.0.3 Index]