View source: R/predict.coadisc.R
predict.coadisc | R Documentation |
Predicts class of the grouping factor based on a Correspondence Discriminant Analysis (performed using discrimin.coa
).
## S3 method for class 'coadisc'
predict(object, newdata, method = c("mahalanobis", "euclidian"), ...)
object |
object of class inheriting from |
newdata |
contingency table (either a |
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. |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
discrimin.coa
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.