5 dic 2011

PCA file calculation with "R".

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.

No hay comentarios:

Publicar un comentario