0

i am doing PLS with Mixomics package. I have 2 blocks of data, Performances and MethodesAlter.

R code :

Y <- Performances
X3 <- MethodesAlter 
rownames(X3) <- rownames(Y)
pls1 <- pls(X3, Y, ncomp=4, mode = "canonical")
plotVar(pls1)

But it works only for 2 blocks of data and i want to know, how to do the same with 3 or 4 blocks of data? What package(s) allow to do that ? I am a beginner in PLS :/

Thanks for our help.

Phil
  • 7,287
  • 3
  • 36
  • 66
  • Hi! Welcome to StackOverflow! To help you along with your question we need a [minimal reproducable example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Right now it is hard to help you with your question, because it is not clear what your data looks like. Please provide a sample of `Y` and `X3`, as well as other "blocks" of data you would like to include in the full version you're after. – Tim Jun 14 '21 at 10:20
  • Hello, Y is composed of data on fruit losses in orchards and and the quantities of pesticides used. These are the variables to explain. Losses are explained with explanatory variables that make up the other groups. I want to confront Y with X1 meteorological data, X2 data on the action levers used, X3 on bioaggressors, at the same time, but with this package, it's possible with only 2 blocks at the same time i think. All data are quantitative. The data for each block corresponds to measurements made over several years. – Thomas Soudet Jun 15 '21 at 06:06

1 Answers1

1

The answer is late but if you want to use a Partial Least Square method with several blocks (>2), you can use the block.pls function of the mixOmics package (or block.spls if you want to integrate sparsity constraints). This function allows to regress a continuous Y matrix. If you want to regress a categorical variable you can for example use the homologous function block.plsda. You will find here some examples with R code in the context of the block.plsda method:

https://mixomicsteam.github.io/Bookdown/diablo.html

gdrouard
  • 126
  • 6