Learn R Programming

mclustAddons (version 0.10)

mclustMarginalParams: Marginal parameters from fitted GMMs via mclust

Description

Function to compute the marginal parameters from a fitted Gaussian mixture models.

Usage

mclustMarginalParams(object, ...)

gmm2margParams(pro, mu, sigma, ...)

Value

Returns a list of two components for the mean and covariance of the marginal distribution.

Arguments

object

An object of class Mclust or densityMclust.

...

Further arguments passed to or from other methods.

pro

A vector of mixing proportions for each mixture component.

mu

A matrix of mean vectors for each mixture component. For a \(d\)-variate dataset on \(G\) components, the matrix has dimension \((d \times G)\).

sigma

An array of covariance matrices for each mixture component. For a \(d\)-variate dataset on \(G\) components, the array has dimension \((d \times d \times G)\).

Author

Luca Scrucca

Details

Given a \(G\)-component GMM with estimated mixture weight \(\pi_k\), mean vector \(\mu_{k}\), and covariance matrix \(\Sigma_{k}\), for mixture component \(k = 1, \dots, G\), then the marginal distribution has:

  • mean vector $$\mu = \sum_{k=1}^G \pi_k \mu_k$$

  • covariance matrix $$\Sigma = \sum_{k=1}^G \pi_k \Sigma_k + \pi_k (\mu_k - \mu)'(\mu_k - \mu)$$

References

Frühwirth-Schnatter S. (2006) Finite Mixture and Markov Switching Models, Springer, Sec. 6.1.1

See Also

mclust::Mclust(), mclust::densityMclust().

Examples

Run this code
x = iris[,1:4]
mod = Mclust(x, G = 3)
mod$parameters$pro
mod$parameters$mean
mod$parameters$variance$sigma
mclustMarginalParams(mod)

Run the code above in your browser using DataLab