View source: R/item_analysis.R
distractor_analysis | R Documentation |
Distractor Analysis Function
distractor_analysis(resp, key = NULL, ip = NULL, criterion = NULL)
resp |
It can be either a |
key |
The answer key for the responses. Keys can also be provided via
|
ip |
An |
criterion |
Provide a continuous criterion variable such as a total
raw score, or theta score that will be used in the calculation of
correlation calculations. If this value is |
A data.frame with following columns
Item identifier
Answer key
The selected option
Number of subjects/examinees answered this item
Observed proportions of the choice.
Biserial correlation between the examinees selected the choice and the total scores.
Point-biserial correlation between the examinees selected the choice and the total scores.
Biserial correlation between item and total score without this item. Sum scores will be used in the calculation of 'bis_adj' even 'criterion' is provided.
Point-biserial correlation between item and total score without this item. Sum scores will be used in the calculation of 'bis_adj' even 'criterion' is provided.
Emre Gonulates
n_item <- 10 # sample(8:12, 1)
n_theta <- 50 # 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)))
# Add some missing responses
raw_resp[sample(1:length(raw_resp), round(length(raw_resp)*.1))] <- NA
# Prepare answer key
key <- sample(LETTERS[1:4], n_item, replace = TRUE)
# Run distractor analysis:
da <- distractor_analysis(resp = raw_resp, key = key)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.