Learn R Programming

MatrixCorrelation (version 0.10.0)

PCAcv: Principal Component Analysis cross-validation error

Description

PRESS values for PCA as implemented by Eigenvector and described by Bro et al. (2008).

Usage

PCAcv(X, ncomp)

Arguments

X

matrix object to perform PCA on.

ncomp

integer number of components.

Value

A vector of PRESS-values.

Details

For each number of components predicted residual sum of squares are calculated based on leave-one-out cross-validation. The implementation ensures no over-fitting or information bleeding.

References

R. Bro, K. Kjeldahl, A.K. Smilde, H.A.L. Kiers, Cross-validation of component models: A critical look at current methods. Anal Bioanal Chem (2008) 390: 1241-1251.

See Also

plot.SMI (print.SMI/summary.SMI), RV (RV2/RVadj), r1 (r2/r3/r4/GCD), allCorrelations (matrix correlation comparison).

Examples

Run this code
# NOT RUN {
X1  <- scale( matrix( rnorm(100*300), 100,300), scale = FALSE)
PCAcv(X1,10)

# }

Run the code above in your browser using DataLab