data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model2 <- latrend(method, latrendData, nClusters = 2)
# fit for a different number of clusters
model3 <- update(model2, nClusters = 3)
Run the code above in your browser using DataLab