plot.emMSmix {MSmix}R Documentation

Plot the MLEs for the fitted mixture of Mallows models with Spearman distance

Description

plot method for class "emMSmix".

Usage

## S3 method for class 'emMSmix'
plot(x, max_scale_w = 20, mar_lr = 0.4, mar_tb = 0.2, ...)

Arguments

x

An object of class "emMSmix" returned by fitMSmix.

max_scale_w

Positive scalar: maximum magnification of the dots in the bump plot, set proportional to the MLEs of the weights. Defaults to 20.

mar_lr

Numeric: margin for the left and right side of the plot. Defaults to 0.4.

mar_tb

Numeric: margin for the bottom and top side of the plot. Defaults to 0.2.

...

Further arguments passed to or from other methods (not used).

Value

Produce a bump plot to compare the component-specific consensus rankings of the fitted mixture of Mallow models with Spearman distance. The size of the dots of each consensus ranking is proportional to the weight of the corresponding component. When n_clust > 1, It also returns a heatmap of the estimated coponent membership probabilities.

References

Sjoberg D (2020). ggbump: Bump Chart and Sigmoid Curves. R package version 0.1.10. https://CRAN.R-project.org/package=ggbump.

Wickham H et al. (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686, DOI: 10.21105/joss.01686.

Wickham H (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4, https://ggplot2.tidyverse.org.

See Also

fitMSmix, summary.emMSmix

Examples

## Example 1. Fit a 3-component mixture of Mallow models with Spearman distance
## to the Antifragility dataset.
set.seed(123)
mms_fit <- fitMSmix(rankings = ranks_antifragility, n_clust = 3, n_start = 10)
plot(mms_fit)



[Package MSmix version 1.0.1 Index]