.EMC) controlling the options,
methods, conditions and models of EM algorithms.
As .EMC, this function generate a default template.
One can either modify .EMC or employ this function to
control EM algorithms..EMControl(exhaust.iter = 1, fixed.iter = 5,
short.iter = 100, EM.iter = 1000,
short.eps = 1e-2, EM.eps = 1e-6,
cm.reltol = 1e-8, cm.maxit = 5000,
nm.abstol.Mu.given.QA = 1e-8, nm.reltol.Mu.given.QA = 1e-8,
nm.maxit.Mu.given.QA = 500,
nm.abstol.QA.given.Mu = 1e-8, nm.reltol.QA.given.Mu = 1e-8,
nm.maxit.QA.given.Mu = 5000,
est.non.seg.site = FALSE, max.init.iter = 50,
init.procedure = .init.procedure[1],
init.method = .init.method[1],
substitution.model = .substitution$model[1],
edist.model = .edist.model[1], identifier = .identifier[1],
code.type = .code.type[1], em.method = .em.method[1],
boundary.method = .boundary.method[1], min.n.class = 1)ADJUST..EMC.exhaust.iter, fixed.iter, short.iter, and
short.eps are used to control the iterations of initialization
procedures and methods. EM.iter and EM.eps are used to control the EM iterations.
cm.reltol and cm.maxit are used to control the ECM
iterations.
Arguments starting with nm. are options for the Nelder-Mead
method as in optim. The C codes of Nelder-Mead are modified
from the R math library and the options are all followed.
abstol and reltol are for absolute and relative tolerances.
Mu.given.QA is for maximizing the profile function of
$\mu_k$ given $Q_k$, and
QA.given.Mu is for maximizing the profile function of
$Q_k$ given $\mu_k$.
est.non.seg.site indicates whether to estimate the states of
center sequences. If FALSE, the states will be fixed as the
non segregating sites. Usually, there is no need to estimate.
max.init.iter is for certain initialization methods, e.g.
randomNJ and K-Medoids need few tries to obtain an
appropriate initial state.
init.procedure and init.method are for initializations.
min.n.class is the minimum number of sequences in a cluster to
avoid bad initialization state and degenerated clusters.
.show.option,
.EMC,
.boundary.method,
.code.type,
.edist.model,
.em.method,
.identifier,
.init.method,
.init.procedure,
.substitution,
optim,
phyclust.# The same as .EMC
.EMControl()
# Except code.type, all others are the same as .EMC
.EMControl(code.type = "SNP")
.EMControl(code.type = .code.type[2])Run the code above in your browser using DataLab