Learn R Programming

latrend (version 1.1.0)

min.lcModels: Select the lcModel with the lowest metric value

Description

Select the lcModel with the lowest metric value

Usage

# S3 method for lcModels
min(x, name, ...)

Arguments

x

The lcModels object

name

The name of the internal metric.

...

Additional arguments.

Value

The lcModel with the lowest metric value

See Also

max.lcModels externalMetric

Examples

Run this code
# 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