View source: R/mclust3dSpectra.R
mclust3dSpectra | R Documentation |
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. The interactive plot is made via plotly
and appears in a browser window. 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
.
mclust3dSpectra(
spectra,
pca,
pcs = 1:3,
ellipse = TRUE,
rob = FALSE,
cl = 0.95,
frac.pts.used = 0.8,
truth = NULL,
...
)
spectra |
An object of S3 class |
pca |
An object of class |
pcs |
An integer vector describing which PCs to use. |
ellipse |
Logical indicating if confidence ellipses should be drawn. |
rob |
Logical; if |
cl |
A number indicating the confidence interval for the ellipse. |
frac.pts.used |
If |
truth |
A character vector indicating the known group membership for
reach row of the PC scores. Generally this would be |
... |
Arguments to be passed to |
The mclust model is returned invisibly, and a plot is produced.
Bryan A. Hanson (DePauw University).
Mclust
for background on the method.
Additional documentation at https://bryanhanson.github.io/ChemoSpec/
## Not run:
require(mclust)
data(metMUD1)
pca <- c_pcaSpectra(metMUD1)
mclust3dSpectra(metMUD1, pca)
# show mis-classified points
mclust3dSpectra(metMUD1, pca, truth = metMUD1$groups)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.