View source: R/21_DistractorAnalysis.R
| DistractorAnalysis | R Documentation |
Performs distractor analysis for rated (multiple-choice) models. For each item and rank/class, computes observed category frequency tables, chi-square tests against chance level (uniform distribution), and Cramer's V as an effect size measure.
This function works with results from LRA (rated data) and
Biclustering / Biclustering_IRM (rated data).
DistractorAnalysis(x, ...)
## S3 method for class 'LRArated'
DistractorAnalysis(x, ...)
## S3 method for class 'ratedBiclustering'
DistractorAnalysis(x, ...)
## S3 method for class 'DistractorAnalysis'
print(x, items = NULL, ranks = NULL, digits = 4, ...)
## S3 method for class 'DistractorAnalysis'
plot(x, type = "Distractor", items = NULL, ranks = NULL, nc = 1, nr = 1, ...)
x |
A result object from a rated model (class |
... |
Additional arguments (currently unused). |
items |
Integer vector of item indices to display. NULL for all items. |
ranks |
Integer vector of rank/class indices to display. NULL for all ranks. |
digits |
Number of digits for rounding. Default is 4. |
type |
Plot type. Currently only "Distractor" is supported. |
nc |
Number of columns in the plot grid. |
nr |
Number of rows in the plot grid. |
An object of class c("exametrika", "DistractorAnalysis") containing:
List of frequency matrices (nrank x maxQ), one per item.
List of proportion matrices (nrank x maxQ), one per item.
Matrix (nitems x nrank) of chi-square statistics.
Matrix (nitems x nrank) of p-values.
Matrix (nitems x nrank) of Cramer's V effect sizes.
Correct answer vector.
Number of ranks/classes.
Number of response categories.
Number of items.
Item label vector.
Number of fields (Biclustering only).
Field assignment vector (Biclustering only).
List of item indices per field (Biclustering only).
# LRA.rated example
result_lra <- LRA(J21S300, nrank = 5, mic = TRUE)
da <- DistractorAnalysis(result_lra)
print(da)
print(da, items = 1:3)
print(da, ranks = c(1, 5))
plot(da)
plot(da, items = 1:6, nc = 3, nr = 2)
# Biclustering.rated example
result_bic <- Biclustering(J21S300, ncls = 5, nfld = 3, method = "R")
da_bic <- DistractorAnalysis(result_bic)
print(da_bic, items = 1:7)
plot(da_bic, items = 1:6, nc = 3, nr = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.