EMnormal {MixSemiRob}R Documentation

Parameter Estimation of Normal Mixture Using EM Algorithm

Description

‘EMnormal’ is used to estimate the parameters of a univariate or multivariate normal mixture model using the expectation-maximization (EM) algorithm. The result can be used as the initial value for the mixLogconc and mixLogconcHD function.

Usage

EMnormal(x, C = 2, nstart = 20, tol = 1e-05)

Arguments

x

an n by p data matrix where n is the number of observations and p is the dimension of the data.

C

number of mixture components. Default is 2.

nstart

number of initializations to try. Default is 20.

tol

stopping criteria (threshold value) for the EM algorithm. Default is 1e-05.

Value

A list containing the following elements:

loglik

final log-likelihood.

pi

estimated mixing proportions.

mu

estimated component means.

sigma

estimated component standard deviation or covariance matrix.

See Also

mixLogconc, mixLogconcHD

Examples

#-----------------------------------------------------------------------------------------#
# Univariate Case
#-----------------------------------------------------------------------------------------#
x = matrix(rnorm(100, 2, sqrt(2)), nrow = 100)
x[1:60] = x[1:60] + 5
ini = EMnormal(x)

[Package MixSemiRob version 1.1.0 Index]