Seek the best partitions

Share:

Description

Seek the best partitions in an object of class KmlCovList and return the best one of each fixed number of cluster.

Usage

1
  which_best(kmlcovar, crit = "log-class-likelihood")

Arguments

kmlcovar

An object of class KmlCovList.

crit

Name of the criterion which have to be optimised, CLL for classification log-likelihood AIC for Akaike information criterion and BIC for Bayesian information criterion.

Value

An object of class GlmCluster or KmlCovList.

See Also

kmlCov

Examples

1
2
3
4
5
data(artifdata)
res <- kmlCov(formula = Y ~ clust(time + time2), data = artifdata, ident = 'id',
timeVar = 'time', effectVar = 'treatment', nClust = 2:3, nRedraw = 2) # run 2 times the algorithm
best <- which_best(res) # return the best partition of each cluster
plot(best)