plot.clustvar: Plot loadings in each cluster.

Description Usage Arguments Value Examples

View source: R/plot.clustvar.R

Description

Plot dotchart with the "loadings" of the variables in each cluster. The loading of a numerical variable is the correlation between this variables and the synthetic variable of its cluster. The loading of the level of a categorical variable is the mean value of the synthetic variable of the cluster on observations having this level.

Usage

1
2
## S3 method for class 'clustvar'
plot(x, ...)

Arguments

x

an object of class clustvar obtained with cutreevar or kmeansvar.

...

Further arguments to be passed to or from other methods. They are ignored in this function.

Value

coord.quanti

coordinates of quantitative variables belonging to cluster k on the synthetic variable associate to the same cluster k

coord.levels

coordinates of levels of categorical variables belonging to cluster k on the synthetic variable associate to the same cluster k

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(wine)
X.quanti <- PCAmixdata::splitmix(wine)$X.quanti
X.quali <- PCAmixdata::splitmix(wine)$X.quali
tree <- hclustvar(X.quanti,X.quali)
tree.cut<-cutreevar(tree,6)

#plot of scores on synthetic variables
res.plot <- plot(tree.cut)
res.plot$coord.quanti
res.plot$coord.levels

Example output

$Cluster1
                                  dim 1
Spice                         0.7319724
Spice.before.shaking          0.7848721
Bitterness                    0.8136727
Odor.Intensity                0.8162919
Odor.Intensity.before.shaking 0.8727845

$Cluster2
                                 dim 1
Aroma.quality.before.shaking 0.8842328
Quality.of.odour             0.8893556
Fruity.before.shaking        0.9234169
Fruity                       0.9531411

$Cluster3
                           dim 1
Acidity               -0.5548310
Flower                 0.8938327
Flower.before.shaking  0.9030650

$Cluster4
                      dim 1
Alcohol           0.8265513
Aroma.intensity   0.8673275
Attack.intensity  0.8752385
Astringency       0.8893068
Nuance            0.9169085
Visual.intensity  0.9278848
Aroma.persistency 0.9280991
Intensity         0.9352941
Surface.feeling   0.9491204

$Cluster5
                     dim 1
Plante          -0.8480155
Aroma.quality    0.9231580
Typical          0.9280745
Harmony          0.9363375
Overall.quality  0.9577121
Smooth           0.9715158
Balance          0.9754011

$Cluster6
             dim 1
Phenolic 0.8944778

$Cluster1
                    dim 1
Soil=Env1      -0.5590466
Soil=Env2      -0.1831480
Soil=Reference -0.0641759
Soil=Env4       2.6391488

$Cluster2
[1] "No categorical variables in this cluster"

$Cluster3
[1] "No categorical variables in this cluster"

$Cluster4
[1] "No categorical variables in this cluster"

$Cluster5
[1] "No categorical variables in this cluster"

$Cluster6
                       dim 1
Label=Bourgueuil -1.35156170
Label=Chinon      0.02370952
Label=Saumur      0.72859383

ClustOfVar documentation built on May 2, 2019, 12:37 p.m.