mclustMarginalParams | R Documentation |
Function to compute the marginal parameters from a fitted Gaussian mixture models.
mclustMarginalParams(object, ...)
gmm2margParams(pro, mu, sigma, ...)
object |
An object of class |
... |
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 |
sigma |
An array of covariance matrices for each mixture component.
For a |
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)
Returns a list of two components for the mean and covariance of the marginal distribution.
Luca Scrucca
Frühwirth-Schnatter S. (2006) Finite Mixture and Markov Switching Models, Springer, Sec. 6.1.1
mclust::Mclust()
, mclust::densityMclust()
.
x = iris[,1:4]
mod = Mclust(x, G = 3)
mod$parameters$pro
mod$parameters$mean
mod$parameters$variance$sigma
mclustMarginalParams(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.