| cv_pcaSpectra {ChemoSpec} | R Documentation |
This function carries out classical PCA on the data in a
Spectra object using a cross-validation method. A simple
re-write of Peter Filzmoser's pcaCV method
with some small plotting changes.
cv_pcaSpectra(spectra, pcs, choice = "noscale", repl = 50, segments = 4,
segment.type = c("random", "consecutive", "interleaved"), length.seg,
trace = FALSE, ...)
spectra |
An object of S3 class |
pcs |
As per |
choice |
A character string indicating the choice of scaling. One of
|
repl |
As per |
segments |
As per |
segment.type |
As per |
length.seg |
As per |
trace |
As per |
... |
Parameters to be passed to the plotting routines. |
A list as described in pcaCV, so the
result must be assigned or it will appear at the console. Side effect is a
plot.
Bryan A. Hanson, DePauw University. Derived from pcaCV.
K. Varmuza and P. Filzmoser Introduction to Multivariate Statistical Analysis in Chemometrics, CRC Press, 2009.
https://github.com/bryanhanson/ChemoSpec
pcaCV for the underlying function.
data(SrE.IR) pca <- cv_pcaSpectra(SrE.IR, pcs = 5)