View source: R/model-evaluation.R
| confusionMatrix | R Documentation | 
Compute the posterior confusion matrix (PCM).
The entry (i,j) represents the probability (or number, in case of  scale = TRUE) of a trajectory
belonging to cluster i is assigned to cluster j under the specified trajectory cluster assignment strategy.
confusionMatrix(object, strategy = which.max, scale = TRUE, ...)
| object | The model, of type  | 
| strategy | The strategy for assigning trajectories to a specific cluster, see  | 
| scale | Whether to express the confusion in probabilities ( | 
| ... | Additional arguments passed to  | 
A K-by-K confusion matrix with K = nClusters(object).
postprob clusterProportions trajectoryAssignments APPA OCC
data(latrendData)
if (rlang::is_installed("lcmm")) {
  method <- lcMethodLcmmGMM(
    fixed = Y ~ Time,
    mixture = ~ Time,
    random = ~ 1,
    id = "Id",
    time = "Time"
  )
  model <- latrend(method, latrendData)
  confusionMatrix(model)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.