prediction method to be applied for PLS-DA cross-validation. Should be a subset of "mahalanobis.dist" (default), "centroids.dist" or "max.dist".
M
the number of folds in the M-fold cross-validation.
nperm
number of permutations.
Value
methoda character string giving the name of the test.
data.namea character string giving the name(s) of the data and parameters of the cross-validation.
p.valuep-value of the permutational test.
alternativea character string describing the alternative hypothesis, always "greater".
null.valuethe classification error rate obtained from the original model.
estimatethe classification error rate obtained from the original model.
pred.methoddistance criterion used in cross-validation.
Mnumber of folds in the M-fold cross-validation.
permutationsnumber of permutations.
Warning
The process is quite long and takes several minutes to be achieved. Just don't worry.
Details
Data have to be balanced to perform the test. The function automatically takes care of it by taking equal number of individuals in each class of the factor, randomly chosen for each class and in each permutation. The number of individuals kept is equal to the number of individuals in the smallest class.
To compare classification error rates of the original and permuted models, classification error rate of the original model must be obtained with balanced data. The function does this by randomly choosing equal number of individuals in each class (as in the permutation process). However, to avoid basing the test on an original classification error rate obtained from non representative individuals, the process is repeated 30 times and the mean of these 30 values is considered as the classification error rate of the original model.
# Not enough permutations here but it runs faster.
require(mixOmics)
data(yeast)
X <- t(yeast$data)
Y <- yeast$strain.cond
model <- plsda(X,Y)
PLSDA.test(model,M=3,nperm=29)