max.lcModels | R Documentation |
Select the lcModel with the highest metric value
## S3 method for class 'lcModels'
max(x, name, ...)
x |
The |
name |
The name of the internal metric. |
... |
Additional arguments. |
The lcModel with the highest metric value
Print an argument summary for each of the models.
Convert to a data.frame
of method arguments.
Subset the list.
Compute an internal metric or external metric.
Obtain the best model according to minimizing or maximizing a metric.
Obtain the summed estimation time.
Plot a metric across a variable.
Plot the cluster trajectories.
min.lcModels externalMetric
Other lcModels functions:
as.lcModels()
,
lcModels
,
lcModels-class
,
min.lcModels()
,
plotMetric()
,
print.lcModels()
,
subset.lcModels()
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")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.