Cross validation

Description

Performs cross validation with correspondence discriminant analyses.

Usage

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

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.

Details

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

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

NMC values (repet values).

Author(s)

Maxime Herv<e9> <mx.herve@gmail.com>

See Also

discrimin.coa

Examples

1
2
3
require(ade4)
data(perthi02)
## Not run: CDA.cv(perthi02$tab,perthi02$cla)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.