plot.catdes: Plots for description of clusters (catdes)

View source: R/plot.catdes.R

plot.catdesR Documentation

Plots for description of clusters (catdes)

Description

Plots a graph from a catdes output.

Usage

## S3 method for class 'catdes'
plot(x, show="all",output=c("figure","dt") , level=0.01, sort=NULL,
   col.upper="indianred2", col.lower="royalblue1", numchar = 10,
   barplot = FALSE,cex.names=1, ...)

Arguments

x

A catdes object, see catdes for details.

show

a string. 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. If "quanti.var" is used the characterization of the quantitative variables is given; if "test.chi2" is used the characterization of the qualitative variables is given.

output

string: "dt" for a datatable or "figure" for a figure

level

a positive float. Indicates a critical value the p-value.

sort

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.

col.upper

The color used for under-represented features.

col.lower

The color used for over-represented features.

numchar

number of characters for the labels

barplot

a boolean; if true a barplot per category is drawn, else a table

cex.names

the magnification to be used for the names

...

further arguments passed to or from other methods

Value

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.

Author(s)

Guillaume Le Ray, Camille Chanial, Elise Dumas, Francois Husson francois.husson@institut-agro.fr

See Also

catdes

Examples

## Not run: 
data(wine)
res.c=catdes(wine, num.var=2)
plot(res.c)

## End(Not run)

FactoMineR documentation built on May 29, 2024, 3:36 a.m.