PlotClusters: Graphical representation of clusters of individuals.

Description Usage Arguments Author(s) Examples

View source: R/PlotClusters.r

Description

This function uses a nominal variable to represent groups or clusters of individuals. The clusters can be the result of a clustering algorithm or the groups defined by a external nominal variable. The centroids and convex hulls for each cluster can be represented.

Usage

1
2
PlotClusters(A, Groups = ones(c(nrow(A), 1)),
        colors = NULL, chulls = TRUE, centers = TRUE, ConfidentLevel = 0.95)

Arguments

A

A matrix with the coordinates of each point. It should have only two columns.

Groups

Clustering variable: the cluster for each observation.

colors

It is a vector used to specify the color for each cluster.

chulls

Should convex hulls regions for each cluster be plotted?

centers

Should centroids of each cluster be plotted?

ConfidentLevel

Numerical value between 0 and 1. If it's value is 0.95, five percent of the points with higher distances to the center of each cluster will not be used to calculate centroids and convex hulls.

Author(s)

Julio Cesar Hernandez Sanchez, Jose Luis Vicente-Villardon

Maintainer: Julio Cesar Hernandez Sanchez <juliocesar_avila@usal.es>

Examples

1
2
3
4
5
6
7
8
data(LevelSatPhd)
olbo = OrdinalLogisticBiplot(LevelSatPhd)
x = olbo$RowCoords[, 1]
y = olbo$RowCoords[, 2]
plot(x,y, cex = 0.8, pch=17, xlim=c(-2,2),ylim=c(-2,2))
GroupsF = as.factor(LevelSatPhd[,4])
PlotClusters(olbo$RowCoords, Groups = GroupsF,
    colors = c(1,2,3,4),chulls = TRUE,centers = TRUE,ConfidentLevel=NULL)

OrdinalLogisticBiplot documentation built on May 2, 2019, 3:35 p.m.