[R] Obtain residuals from a Principal Component Analysis
kw.stat at gmail.com
Wed Jul 25 16:59:17 CEST 2012
Just use 'predict' on the fitted model and subtract the predicted
values from the data.
On Wed, Jul 25, 2012 at 5:02 AM, petohtalrayn <h643306 at rtrtr.com> wrote:
> Hi everyone,
> I am relatively new to R, and I need to perform the principal components
> analysis of a data matrix. I know that there are a bunch of methods to do it
> (dudi.pca, princomp, prcomp...) but I have not managed to find a method that
> can return the residuals obtained by retaining X principal components of the
> original data, as this MATLAB function can do: http://is.gd/6WeUFF
> Suggestions? Please, help me to find a way to do it, any information you can
> give will be highly appreciated.
> Thanks in advance!
> View this message in context: http://r.789695.n4.nabble.com/Obtain-residuals-from-a-Principal-Component-Analysis-tp4637754.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help