Learn R Programming

ChemoSpec (version 3.0-1)

pcaBoot: 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

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

Arguments

spectra
An object of S3 class "Spectra".
choice
A character string indicating the choice of scaling. One of c("noscale", "autoscale", "Pareto").
pcs
As per pcaCV where it is called amax; an integer giving the number of PC scores to include.
repl
As per pcaCV; the number of replicates to perform.
segments
As per pcaCV.
segment.type
As per pcaCV.
length.seg
As per pcaCV.
trace
As per pcaCV.
...
Parameters to be passed to the plotting routines.

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.

References

https://github.com/bryanhanson/ChemoSpec K. Varmuza and P. Filzmoser Introduction to Multivariate Statistical Analysis in Chemometrics, CRC Press, 2009.

See Also

pcaCV for the underlying function.

Examples

Run this code
data(SrE.IR)
results <- pcaBoot(SrE.IR, pcs = 5, choice = "noscale")

Run the code above in your browser using DataLab