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 gmm.

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 gmm. If NULL (the default), no data is displayed.

y

A character vector containing the variables displayed on the y-axis (by default all the variables of gmm).

x

A character vector containing the variables displayed on the x-axis (by default all the variables of gmm).

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))


[Package gmgm version 1.1.2 Index]