3
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ Sounds like you need to study principal components analysis and regression a bit more. Have a look at this answer 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. $\endgroup$ – Nick Stauner May 22 '14 at 15:05
  • $\begingroup$ 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. $\endgroup$ – Andy K May 23 '14 at 10:52
5
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Cheers DeathKill. However, the first link is KO. $\endgroup$ – Andy K May 22 '14 at 15:17
  • $\begingroup$ One question though : Will the cross validation gives me the number of axes to keep? $\endgroup$ – Andy K May 22 '14 at 15:25
  • $\begingroup$ Thanks - I just fixed the link. You can use the CV test function to get a better idea of the number of factors you might want. I have added another link in there that includes an example of how to do this. $\endgroup$ – Deathkill14 May 22 '14 at 17:34
  • 1
    $\begingroup$ My pleasure. It is cool stuff. $\endgroup$ – Deathkill14 May 23 '14 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.