OPLS-DA for MATLAB or R-Package Log Out | Topics | Search
Moderators | Register | Edit Profile

NIR Discussion Forum » Bruce Campbell's List » Chemometrics » OPLS-DA for MATLAB or R-Package « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Johan Trygg (trygg)
Junior Member
Username: trygg

Post Number: 10
Registered: 1-2006
Posted on Sunday, February 12, 2012 - 2:20 pm:   

Hi Farshad,
In SIMCA-P+ you can use the OPLS/O2PLS Class model and then use Autofit Class Model in the Analysis menu to estimate any number of two-class OPLS models.

1.) Create one data matrix that consists of multiple blocks of data, piled on top of each other. Each block consists of the data to be used for one OPLS-DA model, e.g. [Disease1;Control]. Each single block includes both X-data (metabolites) and Y-data (class belonging using a dummy vector/matrix with "1" for disease, and "0" for Control. It's important to always use a lower value (e.g. "0" ) for reference class as the OPLS model will then always have the Control samples to the left in the score plot (making interpretation much easier) (you can read more about this in the reference below)
2.) Then in Workset|Observations, you assign each of these blocks as one class, by "Set class". The number of classes will be equal to the number of models you want to generate.
3.) You then assign in Workset|Variables the y-vector (the dummy variable that holds information of class belonging).
4.) Then, you simply select as Model Type (either inside the Workset dialogue or Analysis|Change Model Type| to "OPLS/O2PLS Class". You can now decide if the Autofit function should decide the number of components, or set the number yourself (for all or individual models).
5.) This generates a batch series of models, each fitted as you wished, and since they are individual OPLS models, you can easily visualize, predict, interpret and remodel each one of them. Don't forget that you will always only have one predictive component, but any number of orthogonal components. Be sure that you check the size of the Orthogonal components in comparison to your predictive component. If larger (which is often the case, please interrogate and understand what it is). The size can be easily spotted in the scores plot or in the Model summary plot.

I also propose that you interrogate each OPLS model using the S-plot (under Favourites menu), or compare two separate OPLS models using the SUS plot. You find more information in the reference below on OPLS-DA analysis, and I also included the OPLS-DA paper that describes the theory and method in detail.

REFERENCES
Wiklund S, Johansson E, Sj�str�m L, Mellerowicz EJ, Edlund U, Shockcor JP, Gottfries J, Moritz T, Trygg J, Visualization of GC/TOF-MS-Based Metabolomics Data for Identification of Biochemically Interesting Compounds Using OPLS Class Models, ANALYTICAL CHEMISTRY 2008 80, 1:115-22 [http://dx.doi.org/10.1021/ac0713510]

Bylesj� B, Rantalainen M, Cloarec O, Nicholson JK, Holmes E, Trygg J, OPLS Discriminant Analysis, Combining the strengths of PLS-DA and SIMCA classification, JOURNAL OF CHEMOMETRICS, 2007 20:341-351 [doi.wiley.com/10.1002/cem.1006]


Best of luck,

Regards,
Johan Trygg, Ume� University, Sweden
Top of pagePrevious messageNext messageBottom of page Link to this message

Barry M. Wise (bmw)
Member
Username: bmw

Post Number: 12
Registered: 2-2011
Posted on Saturday, February 11, 2012 - 9:24 pm:   

Hi:

PLS_Toolbox allows you to do O-PLS-DA. It isn't free but it is open source. Note that the O-PLS factorization can be easily obtained by post-processing a conventional PLS model. Doing O-PLS does not change the predictive ability of the PLS model.

BMW
Top of pagePrevious messageNext messageBottom of page Link to this message

Farshad Farshidfar (farshad)
New member
Username: farshad

Post Number: 1
Registered: 2-2012
Posted on Saturday, February 11, 2012 - 8:25 pm:   

Hi everybody,
I am wondering if there is any open-source code available for OPLS-DA to be implemented in MATLAB or R programming. If it is not how it is possible, to run a batch series of OPLS-DA in SIMCA-P+?

Thanks for your attention.

Add Your Message Here
Posting is currently disabled in this topic. Contact your discussion moderator for more information.