Learn R Programming

EnQuireR (version 0.10)

ENellipse: Confidence ellipses

Description

This function allows to draw ellipses around the categories of a chosen variable.

Usage

ENellipse(matP, cluster, resampling="population", iter=500, alpha = 0.05, coord = c(1, 2), eig, cex = 1, color = NULL)

Arguments

matP
factorial coordinates from MCA
cluster
chosen categorical variable
resampling
If "population", the resampling is done within the whole dataset. If "cluster", it is done within the clusters
iter
number of iterations for the Bootstrap method, by default iter=500
alpha
the confidence level of the ellipses. By default alpha=0.05
coord
selected axes
eig
eigenvalues of the MCA
cex
graphical option: character size
color
graphical option: ellipses' colours

Details

This function can be used to draw ellipses around the centers of gravity of each cluster, when the chosen categorical variable is the variable obtained after the cluster analysis.

Examples

Run this code
## Not run: 
# data(tea)
# res.enmca=ENMCA(tea[,1:18])
# x<-res.enmca$MCA$ind$coord[,1:2]
# b<-res.enmca$data[,ncol(res.enmca$data)]
# ENellipse(matP=x, cluster=b, resampling="population", iter=500, alpha = 0.05, coord = c(1, 2), eig=res.enmca$MCA$eig, cex = 1, color = NULL)
# ## End(Not run)

Run the code above in your browser using DataLab