| plotTRP_gg | R Documentation |
This function takes exametrika output as input and generates a Test Reference Profile (TRP) plot using ggplot2. TRP shows the number of students in each latent class/rank (bar graph) and the expected test score for each class/rank (line graph).
plotTRP_gg(
data,
Num_Students = TRUE,
title = TRUE,
colors = NULL,
linetype = "dashed",
show_legend = FALSE,
legend_position = "right"
)
data |
An object from exametrika: LCA, LRA, Biclustering, nominalBiclustering, ordinalBiclustering, ratedBiclustering, IRM, LDLRA, LDB, or BINET output. |
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
expected score line. Default is |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend.
One of |
The Test Reference Profile provides an overview of the latent structure. The bar graph shows how students are distributed across classes/ranks, while the line graph shows the expected test score for each class/rank. In well-fitted models, expected scores should increase monotonically with class/rank number.
A single ggplot object with dual y-axes showing both the student distribution and expected scores.
plotIRP_gg, plotLCD_gg,
plotLRD_gg
library(exametrika)
result <- LRA(J15S500, nrank = 5)
plot <- plotTRP_gg(result)
plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.