| plotICC_overlay_gg | R Documentation |
This function takes exametrika IRT output as input and generates an overlay plot of all Item Characteristic Curves (ICC) using ggplot2. All item curves are displayed on a single graph for easy comparison.
plotICC_overlay_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 item.
If |
linetype |
Character or numeric specifying the line type.
Can be a single value for all items or a vector for each item.
Default is |
show_legend |
Logical. If |
legend_position |
Character. Position of the legend.
One of |
This function is similar to calling plot(IRT_result, type = "IRF", overlay = TRUE)
in the exametrika package, but returns a ggplot2 object that can be further
customized.
The ICC is computed using the four-parameter logistic model:
P(\theta) = c + \frac{d - c}{1 + \exp(-a(\theta - b))}
A single ggplot object showing all Item Characteristic Curves overlaid on one graph.
plotICC_gg, plotIIC_gg
library(exametrika)
result <- IRT(J15S500, model = 3)
plotICC_overlay_gg(result) # All items
plotICC_overlay_gg(result, items = 1:5) # First 5 items only
plotICC_overlay_gg(result, title = "My Custom Title", show_legend = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.