plot.data_descr {MSmix} | R Documentation |
Plot descriptive statistics for partial rankings
Description
plot
method for class "data_descr"
.
Usage
## S3 method for class 'data_descr'
plot(
x,
cex_text_mean = 1,
cex_symb_mean = 12,
marg_by = "item",
cex_text_pc = 3,
cex_range_pc = c(8, 20),
...
)
Arguments
x |
An object of class |
cex_text_mean |
Positive scalar: the magnification to be used for all the labels in the plot for the mean rank vector. Defaults to 1. |
cex_symb_mean |
Positive scalar: the magnification to be used for the symbols in the pictogram of the mean rank vector. Defaults to 12. |
marg_by |
Character indicating whether the marginal distributions must be reported by |
cex_text_pc |
Positive scalar: the magnification to be used for all the labels in the bubble plot of the paired comparison frequencies. Defaults to 3. |
cex_range_pc |
Numeric vector indicating the range of values to be used on each axis in the bubble plot of the paired comparison frequencies. Defaults to |
... |
Further arguments passed to or from other methods (not used). |
Value
Produce 5 plots to display descriptive summaries of the partial ranking dataset, namely: i) a barplot of the frequency distribution (%) of the number of items actually ranked in each partial sequence, ii) a basic pictogram of the mean rank vector, iii) a heatmap of the marginal distirbutions (either by item or by rank), iv) the ecdf of the marginal rank distributions and v) a bubble plot of the pairwise comparison matrix.
References
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
Examples
## Example 1. Plot sample statistics for the Antifragility dataset.
r_antifrag <- ranks_antifragility[, 1:7]
desc <- data_description(r_antifrag)
plot(desc)
## Example 2. Plot sample statistics for the Sports dataset.
r_sports <- ranks_sports[, 1:8]
desc <- data_description(rankings = r_sports, borda_ord = TRUE)
plot(desc, cex_text_mean = 1.2)
## Example 3. Plot sample statistics for the Sports dataset by gender.
r_sports <- ranks_sports[, 1:8]
desc_f <- data_description(rankings = r_sports, subset = (ranks_sports$Gender == "Female"))
plot(desc_f, cex_text_mean = 1.2)
desc_m <- data_description(rankings = r_sports, subset = (ranks_sports$Gender == "Male"))
plot(desc_m, cex_text_mean = 1.2)