| ctt_item | R Documentation |
Computes traditional classical test theory (CTT) item statistics - difficulty, an item-total correlation (discrimination), and Cronbach's alpha with the item removed - for dichotomous or polytomous item response data, along with optional flagging of items that fall outside commonly used quality thresholds.
ctt_item(
data,
item.id = NULL,
cats = NULL,
correct = FALSE,
missing = NA,
flag = TRUE,
crit.p = c(0.1, 0.95),
crit.dis = 0.2
)
data |
A data frame or matrix of already-scored item responses, with
examinees in rows and items in columns. Item scores must range from 0 to
|
item.id |
A character vector of item identifiers, in the same order
as the columns of |
cats |
A numeric vector giving the number of score categories for
each item (e.g., 2 for a dichotomous item), following the |
correct |
Logical. Both the raw (uncorrected) item-total correlation -
where an item (or, in |
missing |
A value indicating missing responses in |
flag |
Logical. If |
crit.p |
A numeric vector of length two giving the lower and upper
difficulty bounds used for flagging: difficulty below the first value is
flagged as too difficult, and difficulty above the second value is
flagged as too easy. Default is |
crit.dis |
A single numeric value giving the minimum acceptable
discrimination (item-total correlation); items strictly below this value
are flagged as poorly discriminating. Default is |
Difficulty for item j is defined generally as the mean observed score
divided by the item's maximum possible score,
mean(data[, j], na.rm = TRUE) / (cats[j] - 1). For a dichotomous item
(cats[j] = 2), this reduces to the familiar proportion-correct difficulty
index. For a polytomous item, this expresses the average score as a
proportion of the maximum attainable score, so that difficulty remains
interpretable on the same 0-1 scale regardless of the number of score
categories.
Discrimination for item j is the Pearson correlation between the item
score and the total score, which for a dichotomous item is mathematically
equivalent to the point-biserial correlation. Both the uncorrected (raw)
item-total correlation and the corrected (item-excluded) item-total
correlation are always computed and returned as separate columns; see,
e.g., Crocker and Algina (1986) for discussion of both conventions.
This mirrors how some software reports both side by side (e.g.,
psych::alpha() reports the raw item-total correlation as raw.r and
the corrected version as r.drop) rather than defaulting to one or the
other. The correct argument only selects which of the two feeds the
discrimination flagging criterion (see crit.dis).
Alpha-with-item-removed for item j is Cronbach's alpha recomputed on the
remaining ncol(data) - 1 items, using the same variance-based formula
used for an overall, test-level alpha (k / (k - 1) * (1 - sum(item variances) / total variance)). A value of NA is returned wherever a
needed variance is zero (e.g., a constant item, or fewer than two items
remaining), since the relevant ratio is then undefined.
A list with two elements:
item |
A data frame with one row per item, containing the item
label, number of score categories, difficulty, the raw (uncorrected)
item-total correlation ( |
crit |
A list echoing the |
Hwanggyu Lim hglim83@gmail.com
Crocker, L., & Algina, J. (1986). Introduction to classical and modern test theory. Holt, Rinehart and Winston.
score_resp()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.