FDA {FactoMineR} | R Documentation |
Performs Factorial Discriminant Analysis (FDA).
FDA(X, fact, new.data = NULL, new.fact = NULL, prior = NULL, cross.val = FALSE, graph = TRUE)
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 |
If there is no test sample, the evaluation of the affectation model is realised on the test sample itself.
Returns a list including :
eig |
a numeric vector containing all the eigenvalues |
eigen.vectors |
a list of matrices containing all the eigenvectors |
var |
a list of matrices containing all the results for the active variables |
cg |
a list of matrices containing all the results for the centers of gravity |
ind |
a list of matrices containing all the results for the individuals |
call |
a list with the data frame and grouping factor used |
df |
the discriminant functions |
score |
a vector whith the individuals scores. |
eval |
a list with all the results for the evaluation of the affectation model |
res.cv |
a list with all the results for for leave-one-out cross-validation. |
Jeremy Mazet jeremy.mazet@soredab.org
data(wine) res.fda <- FDA(wine[,-(1:28)], fact=wine[,1])