Hi, I am analysing a dataset which has a very little variation across the variable I want to predict (case or control), so when I do the opls with orthoI = NA gives me an error:
opls(dataMatrixfiltered, conditionFc, predI = 1, orthoI= NA)
Error: No model was built because the predictive component was not significant
so I setup orthoI as 0 to get a model of PLS.
When I try to get the confusion matrix using the subsetVi as in the user guide I get the following:
To have the getSubsetVi work (and give you the indices of the samples used for training), you must define a training subset when building the model, by using the subset argument in the opls method to specify the indices of those training samples (in the vignette, subset = 'odd' is used to select all samples with odd indices)
Before checking the performance of your model, you must check that it is valid (i.e. not built on noise): as explained in section 4.5.1 of the vignette, your pQ2 value in the title of the bottom right graphics should be below 5%
If the model is valid, two performance metrics are available on the legend of the score plot: Q2Y (cross-validated R2) and RMSEE (estimated RMSE by cross-validation). You may also compute other metrics (such as accuracy) by building confusion matrices, as you suggested in your question.