I'm trying to learn how to use the ropls package. However, I was totally lost when reading the package's vignette. I then tried to read the package's help page (retuned from running the code ?opls in RStudio) but that didn't help much.
In particular, I want to understand how the model calculated the score matrices for predictors X and response variable Y. From the following example
data(sacurine)
attach(sacurine)
sacurine.plsda <- opls(dataMatrix, sampleMetadata[, "gender"]
I think the Y's scores can be extracted as follows
sacurine.plsda@uMN
# returned:
p1 p2 p3
HU_011 -0.9085508 -0.248134724 -0.807150202
HU_014 1.0946395 0.910514168 0.550667721
HU_015 -0.9085508 0.167882380 0.027208109
HU_017 -0.9085508 -0.125803393 0.022100921
HU_018 -0.9085508 -0.320990409 -0.036994383
HU_019 -0.9085508 -0.525569323 -0.266313385
HU_020 -0.9085508 -0.541144344 -0.911891631
HU_021 -0.9085508 -0.296989083 -0.124188530
...
My questions are:
Why did the
sacurine.plsdamodel use only one response variable (in this examplegender)?How were the values from
sacurine.plsda@uMNcalculated?