gmm: Gaussian Mixture Model

Description Usage Arguments Value Examples

Description

EM algorithm for mixtures of gaussians

Usage

1
gmm(x, k, imeans = NULL, isd = NULL, ilambda = NULL, print=FALSE, tol=1e-8, maxit = 1000L)

Arguments

x

numeric vector containing data

k

integer specifying number of gaussians to be fitted

imeans

optional initial means for mixture model

isd

optional initial standard deviations for mixture model

ilambda

optional initial mixing proportions for mixture model. Must sum to 1.

print

logical indicating whether or not progress is printed to screen.

tol

Convergence criteria for mixture model.

maxit

integer specifying maximum number of iterations allowed

Value

returns a mixture model.

Examples

1
2
3
4
test<-c(rnorm(1000),rnorm(1000,mean = 3,sd = 1))
hist(test)
a<-gmm(test,2)
plot(a)

FIACH documentation built on May 1, 2019, 8:02 p.m.

Related to gmm in FIACH...