CDA.cv: Cross validation

View source: R/CDA.cv.R

CDA.cvR Documentation

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"))

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

Classification error rates (repet values).

Author(s)

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

See Also

discrimin.coa

Examples

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

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.