Learn R Programming

RVAideMemoire (version 0.9-27)

LDA.format: Re-formating LDA data

Description

Re-format data obtained from the lda() function of the package MASS, especially to get coordinates of individuals on factorial plans and correlation between original variables and LDA components.

Usage

LDA.format(model)

Arguments

model
object of class "lda" (from the function lda() of the package MASS).

Value

  • xoriginal data (X variables only).
  • groupingclass of each individual.
  • licoordinates of each individual on the LDA components.
  • cocorrelation between original variables and LDA components.

See Also

lda, s.class, s.corcircle

Examples

Run this code
require(MASS)
require(ade4)
data(iris)
model.LDA <- lda(iris[,1:4],iris$Species)
coord <- LDA.format(model.LDA)
s.class(coord$li,fac=coord$grouping,col=rainbow(nlevels(coord$grouping)),cellipse=0)
s.corcircle(coord$co,label=abbreviate(rownames(coord$co),3))

Run the code above in your browser using DataLab