3

I'm doing a PLS regression with SAS. My man-a asked me to do find the numbers of principal components for the dataset I'm working with through SAS.

As I've never done that before, I'm confused on how to do it.

Should I run a PCA on my dataset then use the most relevant components found then use that numbers on my PLS or SAS has the ability to that? If so, how should I do it?

amoeba
  • 93,463
  • 28
  • 275
  • 317
Andy K
  • 173
  • 1
  • 2
  • 19
  • Sounds like you need to study principal components analysis and regression a bit more. Have a look at [this answer](http://stats.stackexchange.com/a/87231/32036) and some of the links, references, and Scortchi's comment if you want to just dive in, but there are probably better places to look for more basic introductions. – Nick Stauner May 22 '14 at 15:05
  • Nick, thanks for your answer. I'm clarifying my position. I'm not asking anyone to do my homework. I'm only asking for leads, to show me the way like when you are in a foreign city and you don't know where that famous place is. However, using that analogy and agreeing with you, I have to do the walk to that place , no one is going to do it for me. – Andy K May 23 '14 at 10:52

1 Answers1

7

Selecting the number of components for PLS is a bit trickier than for PCA. For instance, one reason is that quantities such as "explained variance" are more complex since you have both the $\mathbf X$ and $\mathbf Y$ parts of the model contributing to the variation explained.

Thus for PLS, cross-validation tends to be the default method for selecting the number of components. In SAS this can be implemented using the CV feature of its PROC PLS function. Here is a link to the SAS website where they refer to it in their function.

SAS also provides some documentation on exactly what they are doing in the cross-validation procedure they have implemented here if you would like to know the details.

In this document, you have an example of how to do all of this in practice.

amoeba
  • 93,463
  • 28
  • 275
  • 317
Deathkill14
  • 2,140
  • 10
  • 17