Learn R Programming

ChemoSpec (version 2.0-2)

mclust3dSpectra: mclust Analysis of a Spectra Object in 3D

Description

This function conducts an mclust analysis of the PCA results of a "Spectra" object and displays the results in 3D. Classical or robust confidence ellipses can be added if desired. Improperly classified data points can be marked. rgl graphics are employed.

Usage

mclust3dSpectra(spectra, pca, pcs = c(1:3),
	ellipse = TRUE, rob = FALSE, cl = 0.95, frac.pts.used = 0.8,
	truth = NULL, title = "no title provided",
	t.pos = NULL, lab.opts = FALSE, use.sym = FALSE, ...)

Arguments

Value

The mclust model is returned invisibly, and a plot is produced.

Details

If you intend to make a hard copy of your plot, use lab.opts = TRUE until you have found a good view of your data. Then note corners of the cube where the title won't interfere with viewing the data, and use this for t.pos, and add title. Adjust as necessary, then turn off label display using lab.opts = FALSE. Back at the console, use > rgl.snapshot("file_name.png") to create the hardcopy.

Note that the confidence ellipses computed here are generated independently of the Mclust results - they do not correspond to the ellipses seen in 2D plots from Mclust.

References

http://academic.depauw.edu/~hanson/ChemoSpec/ChemoSpec.html

Examples

Run this code
data(CuticleIR)
class <- classPCA(CuticleIR, choice = "noscale")
mclust3dSpectra(CuticleIR, class, title = "mclust3dSpectra demo",
	lab.opts = FALSE, t.pos = "A")

Run the code above in your browser using DataLab