em.cluster.R {ClustMMDD}R Documentation

Compute estimates of the parameters by Expectation and Maximization algorithm.

Description

Compute an approximation of the maximum likelihood estimates of parameters using Expectation and Maximization (EM) algorithm. A maximum a posteriori classification is then derived from the estimated set of parameters.

Usage

em.cluster.R(xdata, K, S, ploidy = 1, emOptions = list(epsi = NULL,
  typeSmallEM = NULL, typeEM = NULL, nberSmallEM = NULL, nberIterations = NULL,
  nberMaxIterations = NULL, putThreshold = NULL), cte = 1)

Arguments

xdata

A matrix of strings with the number of columns equal to ploidy * (number of variables).

K

The number of clusters (or populations).

S

The subset of clustering variables in the form of a vector of logicals indicating the selected variables. S gathers variables that are not identically distributed in at least two clusters.

ploidy

The number of unordered observations represented by a string in xdata. For example, for genotypic data from diploid individual, ploidy = 2.

emOptions

A list of EM options (see EmOptions and setEmOptions).

cte

A double used as a value of λ in the penalty function pen(K,S)=λ*dim≤ft(K,S\right), where dim≤ft(K,S\right) is the number of free parameters in the model defined by ≤ft(K,S\right).

Value

A list of

Author(s)

Wilson Toussile.

References

See Also

dataR2C for transformation of a classic data frame, backward.explorer, selectK.R, dimJump.R, model.selection.R for both model selection and classification.

Examples

data(genotype1)
head(genotype1)
genotype2 = cutEachCol(genotype1[, -11], ploidy = 2)
head(genotype2)

#See the EM options
EmOptions() # Options can be set by \code{\link{setEmOptions()}}
par5 = em.cluster.R (genotype2, K = 5, S = c(rep(TRUE, 8), rep(FALSE, 2)), ploidy = 2)
slotNames(par5)
head(par5["membershipProba"])
par5["mixingProportions"]
par5

[Package ClustMMDD version 1.0.4 Index]