ellipses {gmgm} | R Documentation |
Display the mixture components of a Gaussian mixture model
Description
This function displays the mixture components of a Gaussian mixture model. For each pair of variables, the covariance matrices are represented by confidence ellipses.
Usage
ellipses(
gmm,
data = NULL,
y = rownames(gmm$mu),
x = rownames(gmm$mu),
level = 0.95
)
Arguments
gmm |
An object of class |
data |
A data frame or numeric matrix containing the data displayed with
the mixture components. Its columns must explicitly be named after the
variables of |
y |
A character vector containing the variables displayed on the y-axis
(by default all the variables of |
x |
A character vector containing the variables displayed on the x-axis
(by default all the variables of |
level |
A numeric value in [0, 1[ corresponding to the confidence level of the ellipses. |
Value
A ggplot
object displaying the mixture components (and the
data if required).
Examples
set.seed(0)
data(gmm_body)
ellipses(gmm_body, sampling(gmm_body, n = 500))