| plotICRF_gg | R Documentation |
This function takes exametrika GRM output as input and generates Item Category Response Function (ICRF) plots using ggplot2. Each plot shows the probability of selecting each response category as a function of ability (theta).
plotICRF_gg(
data,
items = NULL,
xvariable = c(-4, 4),
title = TRUE,
colors = NULL,
linetype = "solid",
show_legend = TRUE,
legend_position = "right"
)
data |
An object of class |
items |
Numeric vector specifying which items to plot.
If |
xvariable |
A numeric vector of length 2 specifying the range of the
x-axis (ability). Default is |
title |
Logical or character. If |
colors |
Character vector of colors for each category.
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 Graded Response Model (GRM) estimates the probability of selecting
each ordered response category. For an item with K categories,
the ICRF shows K curves, one for each category. At any given
ability level, the probabilities across all categories sum to 1.
The category probabilities are derived from cumulative probabilities:
P_k^*(\theta) = \frac{1}{1 + \exp(-a(\theta - b_k))}
P_k(\theta) = P_k^*(\theta) - P_{k+1}^*(\theta)
A list of ggplot objects, one for each item. Each plot shows the Item Category Response Function for that item.
plotICC_gg
library(exametrika)
result <- GRM(J5S1000)
plots <- plotICRF_gg(result)
plots[[1]] # Show ICRF for the first item
combinePlots_gg(plots, selectPlots = 1:5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.