0

I am using the pls package and the documentation is great and easy to follow, but everything is referred to and plotted in terms of "components", which are numbered. How do I know which predictor variables "components" 1-n refer to? It looks like my best model will include 6 components and I am really curious what these are.

My model is fit like this:

mod1<-plsr(response ~ ., validation = "LOO", data=df)
Nazer
  • 3,654
  • 8
  • 33
  • 47

1 Answers1

0

pls finds a set of meta-variables or scores to replace your data set, this is what they refer to as components. This is inline with the terminology used in Principal Component Analysis.

You can access the components using pls_out$scores.

kangaroo_cliff
  • 6,067
  • 3
  • 29
  • 42
  • Thanks, would this be equivalent to `mod1$scores` if referring to the code I added above? – Nazer Oct 31 '17 at 15:34
  • Yes, `mod$scores` contain the components. – kangaroo_cliff Oct 31 '17 at 22:08
  • @Nazer Maybe you should accept the answer if it helped you solve your problem. – kangaroo_cliff Nov 03 '17 at 06:56
  • Thanks for your answers, but just don't think I phrased my question correctly. What I want to know is which of my original variables are most important? Scores are meaningless to me. Where can I find which variables make up the meta-variables (which I understand are themselves equations)? What code will give me scientific meaning in this analysis? – Nazer Nov 09 '17 at 19:04
  • "just don't think I phrased my question correctly." - well, I can try to answer what's in your comments, but may be you have phrased them correctly as well... You really have to read help section in SO. – kangaroo_cliff Nov 09 '17 at 23:21