PCA file calculation with "R".

[This article was first published on NIR-Quimiometría, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

X es la matriz centrada (X is the centered matrix).
Xcov es la matriz de covarianzas de X (Xcov is the covariance matrix of X).
Con la función “eigen” calculamos los “eigenvectors” y “eigenvalues” de Xcov.(With the function “eigen” we calculate the “eigenvectors” and “eigenvalues” of  Xcov).
Para hacer todo al mismo tiempo, podemos usar la función “prcomp”.(To do everything at the same time we can use the function “prcomp”).
La diferencia es que con eigen obtenemos la varianza y con prcomp las desviaciones estándar.
The diference is that with eigen we get the variances, and with prcomp the standard deviations.
Podemos comprobar estos resultados con el cálculo del fichero PCA de la entrada anterior.
We can compare this results with the PCA file got in Win ISI in the previous post.

To leave a comment for the author, please follow the link and comment on their blog: NIR-Quimiometría.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)