Learn R Programming

SensoMineR (version 1.0)

plotellipse: Plot confidence ellipses

Description

Plot confidence ellipses.

Usage

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

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

Examples

Run this code
data(chocolates)
ktab.donnee <- ktab.data.frame(cbind.data.frame(chocolates[,1], 
    chocolates[,4], chocolates[,-(1:4)]), blocks = c(2,14), 
    tabnames = c("JP","Gr1"))
ktab.interesting.desc <- search.desc.ktab(ktab.donnee, level = 0.5)
axe <- construct.axes(ktab.interesting.desc, scale.unit = TRUE)
simul <- simulation(axe, nbbloc = length(ktab.interesting.desc$blo)-1)
plotellipse (simul, alpha = 0.05, eig = axe$eig)
#######################################
ktab.donnee <- ktab.data.frame(cbind.data.frame(chocolates[,1],
    chocolates[,4],chocolates[,-(1:4)]), blocks = c(2,6,4,4), 
    tabnames = c("JP","A","F","T"))
ktab.interesting.desc <- search.desc.ktab(ktab.donnee, level = 0.5)
axe <- construct.axes(ktab.interesting.desc, scale.unit = TRUE)
simul <- simulation(axe, nbbloc = length(ktab.interesting.desc$blo)-1)
plotellipse (simul, alpha = 0.05, eig = axe$eig)

Run the code above in your browser using DataLab