| plotICRP_gg | R Documentation |
This function takes exametrika LRAordinal or LRArated output as input and generates an Item Category Reference Profile (ICRP) plot using ggplot2. The plot shows response probability curves for each category across latent ranks. For each item, multiple lines represent the probability of selecting each response category.
plotICRP_gg(
data,
items = NULL,
title = TRUE,
colors = NULL,
linetype = NULL,
show_legend = TRUE,
legend_position = "right"
)
data |
An object of class |
items |
Integer vector specifying which items to plot. Default is all items. |
title |
Logical or character. If |
colors |
Character vector. Colors for category lines.
If |
linetype |
Character or numeric vector. Line types for categories.
If |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend.
One of |
The Item Category Reference Profile (ICRP) visualizes how the response probability for each category changes across latent ranks. Unlike ICBR which shows cumulative probabilities, ICRP shows the raw probability of selecting each specific category.
For an item with K categories (0, 1, ..., K-1), the ICRP shows:
Line for Cat0: P(response = 0 | rank)
Line for Cat1: P(response = 1 | rank)
...
Line for CatK: P(response = K | rank)
The sum of all probabilities at each rank equals 1.0, as they represent mutually exclusive response options.
Ranks are shown in natural order (rank 1, rank 2, ...), matching the base plots of the parent exametrika package.
A single ggplot object with faceted subplots for each item.
plotICBR_gg, plotScoreFreq_gg, plotLRD_gg
library(exametrika)
result <- LRA(J5S1000, nrank = 4)
# Plot first 4 items
plot <- plotICRP_gg(result, items = 1:4)
plot
# Custom colors and title
plot <- plotICRP_gg(result,
items = 1:6,
title = "Item Category Reference Profile",
colors = c("red", "blue", "green", "purple")
)
plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.