| plotCMP_gg | R Documentation |
This function takes exametrika output as input and generates Class Membership Profile (CMP) plots using ggplot2. CMP shows each student's membership probability across all latent classes.
plotCMP_gg(
data,
title = TRUE,
colors = NULL,
linetype = "dashed",
show_legend = FALSE,
legend_position = "right"
)
data |
An object of class |
title |
Logical or character. If |
colors |
Character vector. Color(s) for points and lines.
If |
linetype |
Character or numeric specifying the line type.
Default is |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend.
One of |
The Class Membership Profile visualizes how strongly each student belongs to each latent class. Students with high membership probability in a single class are well-classified, while students with similar probabilities across classes may be ambiguous cases.
A list of ggplot objects, one for each student. Each plot shows the membership probability across all latent classes.
plotRMP_gg, plotLCD_gg
library(exametrika)
result <- LCA(J15S500, ncls = 5)
plots <- plotCMP_gg(result)
plots[[1]] # Show CMP for the first student
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.