| plotTRF_gg | R Documentation |
This function takes exametrika IRT output as input and generates a Test Response Function (TRF) using ggplot2. TRF shows the expected total score as a function of ability (theta).
plotTRF_gg(
data,
xvariable = c(-4, 4),
title = TRUE,
colors = NULL,
linetype = "solid",
show_legend = FALSE,
legend_position = "right"
)
data |
An object of class |
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. Color(s) for the curve.
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 Test Response Function is the sum of all Item Characteristic Curves
(ICCs). At each ability level, TRF represents the expected number of
correct responses across all items. For a test with J items:
TRF(\theta) = \sum_{j=1}^{J} P_j(\theta)
The y-axis ranges from 0 to the total number of items. The function supports 2PL, 3PL, and 4PL IRT models.
A single ggplot object showing the Test Response Function.
plotICC_gg, plotTIC_gg
library(exametrika)
result <- IRT(J15S500, model = 3)
plot <- plotTRF_gg(result)
plot # Show Test Response Function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.