data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
methods <- lcMethods(method, nClusters = 1:3)
models <- latrendBatch(methods, latrendData)
if (require("ggplot2")) {
plotMetric(models, "WMAE")
}
if (require("ggplot2") && require("clusterCrit")) {
plotMetric(models, c("WMAE", "Dunn"))
}
Run the code above in your browser using DataLab