Learn R Programming

ChemoSpec (version 4.2.8)

mclust3D: mclust Analysis in 3D

Description

This function conducts an mclust analysis of the data provided, and plots the points in 3D using rgl graphics. An option is provided for displaying either classical or robust confidence ellipses.

Usage

mclust3D(data, 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.

References

https://github.com/bryanhanson/ChemoSpec

Examples

Run this code
require("mclust")
set.seed(666)
x <- c(rnorm(10, 3, 0.5), rnorm(10, -1, 0.5))
y <- c(rnorm(10, 1, 1), rnorm(10, -4, 0.5))
z <- c(rnorm(10, -2, 0.5), rnorm(10, 3, 0.5))
x[15] <- y[15] <- z[15] <- 4 # screw up one point
my.truth <- c(rep("Z", 10), rep("Q", 10))
mclust3D(cbind(x, y, z), title = "mclust3D demo",
	t.pos = "G", truth = my.truth)

Run the code above in your browser using DataLab