powered by
Diagnostics of PCA to see the explained variance for each variable.
pcaVarexpl(X, a, center = TRUE, scale = TRUE, plot = TRUE, ...)
explained variance for each variable
numeric data frame or matrix
number of principal components
centring of X (FALSE or TRUE)
scaling of X (FALSE or TRUE)
if TRUE make plot with explained variance
additional graphics parameters, see par
par
Peter Filzmoser <[email protected]>
For a desired number of principal components the percentage of explained variance is computed for each variable and plotted.
K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.
princomp
data(glass) res <- pcaVarexpl(glass,a=2)
Run the code above in your browser using DataLab