Plots a graph from a catdes output.
# S3 method for catdes
plot(x, show="all", level=0.01, sort=NULL,
col.upper="indianred2", col.lower="royalblue1", numchar = 10,
barplot = FALSE, …)
A catdes object, see catdes
for details.
a strig. If "quali", only the categorical variables are used. If "quanti", only the the quantitative variables are used. If "all", both quali and quanti are used.
a positive float. Indicates a critical value the p-value.
NULL (default) or an integer between 1 and the number of clusters or a character (the name of a group). If it is an integer or the name of a group, the features are sorted according to their significances in the construction of the given cluster.
The color used for under-represented features.
The color used for over-represented features.
number of characters for the labels
a boolean; if true a barplot per category is drawn, else a table
further arguments passed to or from other methods
if barplot is true, a barplot is drawn per category with variables that significantly describe the category. If barplot is false; it returns a grid. The rows stand for the clusters and the columns for the significant variables. A cell colored in col.lower (resp. col.upper) i.e. by default in blue (resp. red) for a quantitative variable means that the average value of the variable in the given cluster is significantly lower (resp. higher) than in the overall data. A cell colored in col.lower (resp. col.upper) for a categorical variable means that the given value of the variable is significantly under-represented (resp. over-represented) in the given cluster than in the overall data. The degree of transparency of the color also indicates the significance of the difference between the behavior of the variable in the given cluster and in the overall data. Indeed, the more transparent the cell is, the less significant the difference is.
# NOT RUN {
data(wine)
res.c=catdes(wine, num.var=2)
plot(res.c)
# }
Run the code above in your browser using DataLab