max.lcModels {latrend}R Documentation

Select the lcModel with the highest metric value

Description

Select the lcModel with the highest metric value

Usage

## S3 method for class 'lcModels'
max(x, name, ...)

Arguments

x

The lcModels object.

name

The name of the internal metric.

...

Additional arguments.

Value

The lcModel with the highest metric value

Functionality

See Also

min.lcModels externalMetric

Other lcModels functions: as.lcModels(), lcModels, lcModels-class, min.lcModels(), plotMetric(), print.lcModels(), subset.lcModels()

Examples

data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")

model1 <- latrend(method, latrendData, nClusters = 1)
model2 <- latrend(method, latrendData, nClusters = 2)
model3 <- latrend(method, latrendData, nClusters = 3)

models <- lcModels(model1, model2, model3)

if (require("clusterCrit")) {
  max(models, "Dunn")
}

[Package latrend version 1.6.1 Index]