Learn R Programming

ChemoSpec (version 3.0-1)

aovPCAscores: Conduct PCA and plot aovPCA Scores of a Spectra Object

Description

Uses the results from aovPCA to conduct PCA and plot the scores.

Usage

aovPCAscores(spectra, LM, plot = 1, type = "class", choice = NULL, ...)

Arguments

spectra
An object of S3 class "Spectra".
LM
List of matrices created by aovPCA.
plot
An integer specifying which scores to plot.
type
Either classical ("cls") or robust ("rob"); Results in either classPCA or robPCA being called on the Spectra
choice
The type of scaling to be performed. See classPCA and robPCA for details.
...
Additional parameters to be passed to plotScores.

Value

  • Returns the PCA results, and creates the requested plot.

Details

Argument plot is used to select a matrix from those in LM. The residual error matrix is then added to the selected matrix before performing PCA. Use names(LM) to see which factor is stored in which matrix.

References

Pinto, Bosc, Nocairi, Barros, and Rutledge. "Using ANOVA-PCA for Discriminant Analysis: ..." Analytica Chimica Acta 629.1-2 (2008): 47-55.

Harrington, Vieira, Espinoza, Nien, Romero, and Yergey. "Analysis of Variance--Principal Component Analysis: ..." Analytica Chimica Acta 544.1-2 (2005): 118-27.

https://github.com/bryanhanson/ChemoSpec

See Also

The use of this function can be seen in aovPCA. See also plotScores.