ellipses | R Documentation |
This function displays the mixture components of a Gaussian mixture model. For each pair of variables, the covariance matrices are represented by confidence ellipses.
ellipses( gmm, data = NULL, y = rownames(gmm$mu), x = rownames(gmm$mu), level = 0.95 )
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. |
A ggplot
object displaying the mixture components (and the
data if required).
set.seed(0) data(gmm_body) ellipses(gmm_body, sampling(gmm_body, n = 500))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.