Select the lcModel with the lowest metric value
# S3 method for lcModels
min(x, name, ...)
The lcModels
object
The name of the internal metric.
Additional arguments.
The lcModel with the lowest metric value
# NOT RUN {
data(latrendData)
baseMethod <- lcMethodKML(response = "Y", id = "Id", time = "Time")
kml1 <- latrend(baseMethod, nClusters = 1, latrendData)
kml2 <- latrend(baseMethod, nClusters = 2, latrendData)
kml3 <- latrend(baseMethod, nClusters = 3, latrendData)
models <- lcModels(kml1, kml2, kml3)
min(models, 'WRSS')
# }
Run the code above in your browser using DataLab