predict.coadisc: Predict method for CDA

Description Usage Arguments Author(s) See Also Examples

View source: R/predict.coadisc.R

Description

Predicts class of the grouping factor based on a Correspondence Discriminant Analysis (performed using discrimin.coa).

Usage

1
2
## S3 method for class 'coadisc'
predict(object, newdata, method = c("mahalanobis", "euclidian"), ...)

Arguments

object

object of class inheriting from "coadisc".

newdata

contingency table (either a "matrix", "table" or "data.frame" object) giving new individuals (one row per individual).

method

distance metric to be used for prediction. In all cases the predicted class corresponds to the minimum distance between the new individual and the centroid of each class. Default is Mahalanobis distance.

...

further arguments to be passed to or from other methods.

Author(s)

Maxime Herv<e9> <[email protected]>

See Also

discrimin.coa

Examples

1
2
3
4
5
6
require(ade4)
data(perthi02)

CDA <- discrimin.coa(perthi02$tab,perthi02$cla,scan=FALSE)
new <- matrix(c(17,45,32,17,17,52,28,29,6,10,7,7,7,5,10,4,37,34,23,9),ncol=20)
predict(CDA,new)

RVAideMemoire documentation built on Nov. 6, 2018, 5:05 p.m.