Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

discrimin

Linear Discriminant Analysis (descriptive statistic)


Description

performs a linear discriminant analysis.

Usage

discrimin(dudi, fac, scannf = TRUE, nf = 2)
## S3 method for class 'discrimin'
plot(x, xax = 1, yax = 2, ...) 
## S3 method for class 'discrimin'
print(x, ...)

Arguments

dudi

a duality diagram, object of class dudi

fac

a factor defining the classes of discriminant analysis

scannf

a logical value indicating whether the eigenvalues bar plot should be displayed

nf

if scannf FALSE, an integer indicating the number of kept axes


x

an object of class 'discrimin'

xax

the column number of the x-axis

yax

the column number of the y-axis

...

further arguments passed to or from other methods

Value

returns a list of class 'discrimin' containing :

nf

a numeric value indicating the number of kept axes

eig

a numeric vector with all the eigenvalues

fa

a matrix with the loadings: the canonical weights

li

a data frame which gives the canonical scores

va

a matrix which gives the cosines between the variables and the canonical scores

cp

a matrix which gives the cosines between the components and the canonical scores

gc

a data frame which gives the class scores

Author(s)

Daniel Chessel
Anne-Béatrice Dufour anne-beatrice.dufour@univ-lyon1.fr

See Also

lda in package MASS

Examples

data(chazeb)
dis1 <- discrimin(dudi.pca(chazeb$tab, scan = FALSE), chazeb$cla, 
    scan = FALSE)
dis1
if(!adegraphicsLoaded())
  plot(dis1)

data(skulls)
plot(discrimin(dudi.pca(skulls, scan = FALSE), gl(5,30), 
    scan = FALSE))

ade4

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

v1.7-16
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr>, Anne-Béatrice Dufour <anne-beatrice.dufour@univ-lyon1.fr>, and Jean Thioulouse <jean.thioulouse@univ-lyon1.fr>, with contributions from Thibaut Jombart, Sandrine Pavoine, Jean R. Lobry, Sébastien Ollier, Daniel Borcard, Pierre Legendre, Stéphanie Bougeard and Aurélie Siberchicot. Based on earlier work by Daniel Chessel.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.