Learn R Programming

RVAideMemoire (version 0.9-83-7)

CDA.cv: Cross validation

Description

Performs cross validation with correspondence discriminant analyses.

Usage

CDA.cv(X, Y, repet = 10, k = 7, ncomp = NULL, method = c("mahalanobis",
  "euclidian"))

Value

repet

number of times the whole procedure was repeated.

k

number of folds.

ncomp

number of components used.

method

criterion used to classify individuals of the test sets.

groups

levels of Y.

models.list

list of of models generated (repet*k models), for PLSR, CPPLS, PLS-DA, PPLS-DA, LDA and QDA.

NMC

Classification error rates (repet values).

Arguments

X

a data frame of dependent variables (typically contingency or presence-absence table).

Y

factor giving the groups.

repet

an integer giving the number of times the whole procedure has to be repeated.

k

an integer giving the number of folds (can be re-set internally if needed).

ncomp

an integer giving the number of components to be used for prediction. If NULL all components are used.

method

criterion used to predict class membership. See predict.coadisc.

Author

Maxime HERVE <maxime.herve@univ-rennes1.fr>

Details

The training sets are generated in respect to the relative proportions of the levels of Y in the original data set (see splitf).

See Also

discrimin.coa

Examples

Run this code
require(ade4)
data(perthi02)
if (FALSE) CDA.cv(perthi02$tab,perthi02$cla)

Run the code above in your browser using DataLab