OPLS package with @subsetVi = numeric(0)
Entering edit mode
Fernando • 0
Last seen 2.8 years ago

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:

trainVi <- getSubsetVi(experiment.oplsda)

Is there any way to get something to evaluate the model, even if is not a good one?

Thank you!

metabolomicsWorkbenchR PLS OPLS Metabolomics ropls • 1.6k views
Entering edit mode
Last seen 16 months ago


  • 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.

Best regards,



Login before adding your answer.

Traffic: 577 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6