Learn R Programming

SensoMineR (version 1.06)

plotellipse: Plot confidence ellipses

Description

Plot confidence ellipses.

Usage

plotellipse(mat, alpha = 0.05, coord = c(1,2), eig, cex = 1, color = NULL)

Arguments

mat
Matrix with all the points
alpha
the confidence level of the ellipses
coord
a length 2 vector specifying the components to plot
eig
a matrix with the component of the factor analysis (in row) and the eigenvalues, the inertia and the cumulative inertia for each component. Typically, the eig output of the construct.axes function
cex
cf. function par in the graphics package
color
a vector with the colors used; by default there are 35 colors defined

Examples

Run this code
data(chocolates)
donnee <- cbind.data.frame(sensochoc[,c(1,4,5:18)])
axe <- construct.axes(donnee, scale.unit = TRUE)
simul <- simulation(axe)
plotellipse (simul, alpha = 0.05, eig = signif(axe$eig,4))
#######################################
donnee <- cbind.data.frame(sensochoc[,c(1,4,5:18)])
axe <- construct.axes(donnee, group = c(6,8), 
    name.group = c("A-F","T-S"),scale.unit = TRUE)
simul <- simulation(axe, nbgroup = (ncol(axe$partiel)-2)/(ncol(axe$moyen)-2))
plotellipse (simul, alpha = 0.05, eig = signif(axe$eig,4))

Run the code above in your browser using DataLab