plot_distractor_icc {irt} | R Documentation |
Plot Empirical Item or Test characteristic curve
Description
plot_empirical_icc
plots empirical item or test characteristic curve.
Usage
plot_distractor_icc(
raw_resp,
item,
key = NULL,
ip = NULL,
criterion = NULL,
bins = 10,
x_axis_scale = NULL,
add_icc = FALSE,
title = "",
n_dodge = 1,
x_lim = NULL,
base_r_graph = FALSE,
suppress_plot = FALSE,
...
)
Arguments
raw_resp |
Raw response matrix. |
item |
The column number, column name or the 'ID' of the the item that should be plotted. |
key |
A vector of answer key. If |
ip |
An |
criterion |
A vector of examinee abilities. If |
bins |
An integer larger than 2 representing of ability groups examinees
should be grouped into. The default is |
x_axis_scale |
Set the scale of the x-axis. The default value is
|
add_icc |
If |
title |
Title of the plot. If the value is |
n_dodge |
The number of lines the x-axis tick labels should be written
to. This is especially useful if the x-axis tick labels overlap with each
other. The default value is |
x_lim |
The limits of x axis in the form |
base_r_graph |
If |
suppress_plot |
If |
... |
Extra parameters that will pass to |
Value
Depending on the value of suppress_plot
function either prints
the proportion of examinees in each bin respond to each distractor or
returns the plot object.
Author(s)
Emre Gonulates
Examples
n_item <- 10 # sample(8:12, 1)
n_theta <- 10000 # sample(100:200, 1)
raw_resp <- matrix(sample(LETTERS[1:4], n_item * n_theta, replace = TRUE),
nrow = n_theta, ncol = n_item,
dimnames = list(paste0("Examinee-", 1:n_theta),
paste0("Item_", 1:n_item)))
key <- sample(LETTERS[1:4], n_item, replace = TRUE)
plot_distractor_icc(raw_resp, 3, key)
# Change the number of bins
plot_distractor_icc(raw_resp, 3, key, bins = 15)