Learn R Programming

ChemoSpec (version 4.2.8)

cv_pcaSpectra: Cross-Validation of Classical PCA Results for a Spectra Object

Description

This function carries out classical PCA on the data in a Spectra object using a cross-validation method. Nothing more than a wrapper to Peter Filzmoser's pcaCV method with some small plotting changes.

Usage

cv_pcaSpectra(spectra, pcs, choice = "noscale", repl = 50,
	segments = 4, segment.type = c("random", "consecutive", "interleaved"),
	length.seg, trace = FALSE, ...)

Arguments

Value

A list as described in pcaCV, so the result must be assigned or it will appear at the console. Side effect is a plot.

Rdversion

1.1

References

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

https://github.com/bryanhanson/ChemoSpec

See Also

pcaCV for the underlying function.

Examples

Run this code
data(SrE.IR)
results <- cv_pcaSpectra(SrE.IR, pcs = 5)

Run the code above in your browser using DataLab