| plotLCD_gg | R Documentation |
This function takes exametrika output as input and generates a Latent Class Distribution (LCD) plot using ggplot2. LCD shows the number of students in each latent class and the class membership distribution.
plotLCD_gg(
data,
Num_Students = TRUE,
title = TRUE,
colors = NULL,
linetype = "dashed",
show_legend = FALSE,
legend_position = "right"
)
data |
An object of class |
Num_Students |
Logical. If |
title |
Logical or character. If |
colors |
Character vector of length 2. First element is the bar fill
color, second is the line/point color. If |
linetype |
Character or numeric specifying the line type for the
frequency line. Default is |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend.
One of |
The Latent Class Distribution shows how students are distributed across latent classes. The bar graph shows the number of students assigned to each class, and the line graph shows the cumulative class membership distribution.
A single ggplot object with dual y-axes showing both the student count and membership frequency.
plotLRD_gg, plotTRP_gg
library(exametrika)
result <- LCA(J15S500, ncls = 5)
plot <- plotLCD_gg(result)
plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.