Learn R Programming

chemometrics (version 1.4.4)

pcaVarexpl: PCA diagnostics for variables

Description

Diagnostics of PCA to see the explained variance for each variable.

Usage

pcaVarexpl(X, a, center = TRUE, scale = TRUE, plot = TRUE, ...)

Value

ExplVar

explained variance for each variable

Arguments

X

numeric data frame or matrix

a

number of principal components

center

centring of X (FALSE or TRUE)

scale

scaling of X (FALSE or TRUE)

plot

if TRUE make plot with explained variance

...

additional graphics parameters, see par

Author

Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

Details

For a desired number of principal components the percentage of explained variance is computed for each variable and plotted.

References

K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.

See Also

Examples

Run this code
data(glass)
res <- pcaVarexpl(glass,a=2)

Run the code above in your browser using DataLab