MVA.cmv(X, Y, repet = 10, kout = 7, kinn = 8, ncomp = 8, model = c("PLSR",
"CPPLS", "PLS-DA", "PPLS-DA", "PLS-DA/LDA", "PLS-DA/QDA", "PPLS-DA/LDA",
"PPLS-DA/QDA"), crit.inn = c("RMSEP", "Q2", "NMC"), Q2diff = 0.05,
lower = 0.5, upper = 0.5, Y.add = NULL, weights = rep(1, nrow(X)),
set.prior = FALSE, crit.DA = c("plug-in", "predictive", "debiased"), ...)"RMSEP", default) and Q2 ("Q2") are only used for PLSR and CPPLS, whereas the Number of MisClassifications (Q2diff (5% by default).cppls.fit).cppls.fit).cppls.fit).cppls.fit).TRUE, the prior probabilities of class membership are defined according to the mean weight of individuals belonging to each class. If FALSE, prior probabilities are opredict.lda.repet*kout models), for PLSR, CPPLS, PLS-DA and PPLS-DA.repet*kout models), for PLS-DA/LDA, PLS-DA/QDA, PPLS-DA/LDA and PPLS-DA/QDA.repet*kout models), for PLS-DA/LDA, PLS-DA/QDA, PPLS-DA/LDA and PPLS-DA/QDA.repet values).repet values).repet values)."PLS-DA", "PPLS-DA", "PLS-DA/LDA", "PLS-DA/QDA", "PPLS-DA/LDA" or "PPLS-DA/QDA"), the training sets (test set itself in the inner loop, test+validation sets in the outer loop) are generated in respect to the relative proportions of the levels of Y in the original data set (see splitf).
- "PLS-DA" is considered as PLS2 on a dummy-coded response. For a PLS-DA based on the CPPLS algorithm, use "PPLS-DA" with lower and upper limits of the power parameters set to 0.5.
- if a second analysis is used ("PLS-DA/LDA", "PLS-DA/QDA", "PPLS-DA/LDA" or "PPLS-DA/QDA"), a LDA or QDA is built on scores of the first analysis (PLS-DA or PPLS-DA) also in the inner loop. The number of misclassifications, based on this second analysis, is used to choose the number of components.predict.MVA.cmv, mvr, lda, qdarequire(pls)
require(MASS)
# PLSR
data(yarn)
MVA.cmv(yarn$NIR,yarn$density,model="PLSR")
# PPLS-DA coupled to LDA
data(mayonnaise)
MVA.cmv(mayonnaise$NIR,factor(mayonnaise$oil.type),model="PPLS-DA/LDA",crit.inn="NMC")Run the code above in your browser using DataLab