Since PLS-DA is based on PLS regression, object for PLS-DA results contains all results from the corresponding regression model. To use this possibility, this object should also has class regres. Here is the code, which reproduces the problem
data(people)
X <- people[, -c(3, 9)]
c <- as.factor(people[, 9])
m <- plsda(X, c, 3, cv = 1)
plotRMSE(m)
plotPredictions.regmodel(m)
plotRMSE() raises an error and plotPredictions() shows wrong results.
Since PLS-DA is based on PLS regression, object for PLS-DA results contains all results from the corresponding regression model. To use this possibility, this object should also has class
regres
. Here is the code, which reproduces the problemplotRMSE()
raises an error andplotPredictions()
shows wrong results.