Learn R Programming

FactoMineR (version 1.02)

FDA: Factorial Discriminant Analysis

Description

Performs Factorial Discriminant Analysis (FDA).

Usage

FDA(X, fact, new.data = NULL, new.fact = NULL, prior = NULL, 
    cross.val = FALSE, graph = TRUE)

Arguments

X
a data frame with n rows (individuals) and p columns (including one factor).
fact
a factor specifying the class for each observation.
new.data
a data frame of individuals to be classified or, if new.fact is not null, which formed the test sample.
new.fact
if new.dat is not null, a factor specifying the class for each observation of the test sample.
prior
a vector. The prior probabilities of class membership. If unspecified, the class proportions for the training sample (new.dat) are used.
cross.val
if TRUE, returns results for leave-one-out cross-validation.
graph
boolean, if TRUE graphs are plotted

Value

  • Returns a list including :
  • eiga numeric vector containing all the eigenvalues
  • eigen.vectorsa list of matrices containing all the eigenvectors
  • vara list of matrices containing all the results for the active variables
  • cga list of matrices containing all the results for the centers of gravity
  • inda list of matrices containing all the results for the individuals
  • calla list with the data frame and grouping factor used
  • dfthe discriminant functions
  • scorea vector whith the individuals scores.
  • evala list with all the results for the evaluation of the affectation model
  • res.cva list with all the results for for leave-one-out cross-validation.

Details

If there is no test sample, the evaluation of the affectation model is realised on the test sample itself.

See Also

plot.FDA, print.FDA

Examples

Run this code
data(wine)
res.fda <- FDA(wine[,-(1:28)], fact=wine[,1])

Run the code above in your browser using DataLab