Computes the proportion of students who answered each item correctly, commonly called the item p-value in classical test theory.
Arguments
- responses
A matrix or data frame of student responses, with students in rows and items in columns. Entries may be character or numeric (e.g., "A", "B", "C", "D" or 1, 2, 3, 4).
- key
A vector of correct answers with length equal to the number of items.
- na.rm
Logical. If
TRUE, missing responses are excluded from the calculation on a per-item basis. IfFALSE(default), missing responses are scored as incorrect.
Details
Item difficulty is interpreted as the easiness of an item: values near 1 indicate an easy item (most students got it correct), while values near 0 indicate a hard item. Conventional interpretive guidelines suggest that well-functioning items typically have p-values between 0.30 and 0.90, with optimal difficulty around 0.50 for maximum discrimination (Crocker & Algina, 1986).
References
Crocker, L., & Algina, J. (1986). Introduction to classical and modern test theory. Holt, Rinehart and Winston.