| ctt_alpha | R Documentation |
Computes a test-level classical test theory (CTT) reliability summary - Cronbach's alpha (both the raw and standardized forms), the standard error of measurement (SEM), and the average item difficulty and discrimination - from scored item response data.
ctt_alpha(data, item.id = NULL, cats = NULL, correct = FALSE, missing = NA)
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 |
Two forms of Cronbach's alpha are always computed and reported as separate columns:
Raw alpha (alpha) uses the standard variance-based formula,
alpha = (k / (k - 1)) * (1 - sum(item variances) / total-score variance), where k is the number of items. This formula is a general
reliability coefficient that applies unchanged to dichotomous and
polytomous item scores alike, and it reflects the reliability of the
actual (unweighted) total score obtained by simply summing the item
scores - the score most tests actually use for reporting and decisions.
In everyday terms, raw alpha asks: "if every item kept its own natural
scale and spread, how consistently do these items agree with each other?"
Standardized alpha (alpha_std) instead first standardizes every item to
the same scale (unit variance) before combining them, using the
equivalent formula alpha_std = (k * r_bar) / (1 + (k - 1) * r_bar),
where r_bar is the average pairwise correlation among all items. In
everyday terms, standardized alpha asks: "if every item counted equally
regardless of how much it happens to vary in this particular sample, how
consistently would these items agree with each other?" Because it removes
the influence of any single item's variance, standardized alpha is most
useful when items differ substantially in scale or format (e.g., a mix of
dichotomous and polytomous items with very different score ranges); when
all items share the same scale and format (as with a dichotomous
selected-response test scored 0/1), raw and standardized alpha are
typically close, and raw alpha remains the more directly interpretable of
the two since it matches the reliability of the score actually used in
practice. See Cronbach (1951) for the original derivation of coefficient
alpha, and Osburn (2000) for a discussion contrasting the raw
(covariance-based) and standardized (correlation-based) forms.
The standard error of measurement (SEM) is computed as
SEM = SD(total score) * sqrt(1 - alpha) (using raw alpha), following the
standard CTT relationship between test reliability and measurement
precision.
Average difficulty and average discrimination are the simple means of the
per-item difficulty and discrimination values computed by ctt_item()
(any NA per-item value, e.g. from a constant item, is excluded via
na.rm = TRUE). As in ctt_item(), both the raw (uncorrected) and
corrected (item-excluded) item-total correlations are always averaged and
reported as separate columns. ctt_alpha() itself has no flagging step,
so correct has no further effect here beyond being passed through to
ctt_item() for internal consistency.
Because mean_difficulty/mean_discrimination_raw/
mean_discrimination_corrected are averaged with na.rm = TRUE, they
inherit ctt_item()'s cats-auto-inference caveat: an item whose observed
score range never reaches its true maximum (most notably, an item that
every examinee scores 0 on) will have its difficulty silently excluded
from the average rather than contributing a 0, which can bias the
reported mean upward in extreme/degenerate samples. This is unlikely to
matter with a reasonably large, non-degenerate sample, but supplying
cats explicitly avoids the issue entirely. If every item in data is
degenerate in this way, these means will be NaN (mean of an empty/all-
NA vector) rather than NA.
A one-row data frame containing:
n_examinee |
number of examinees included (after listwise deletion). |
n_item |
number of items. |
alpha |
Cronbach's alpha, raw (covariance-based) form. |
alpha_std |
Cronbach's alpha, standardized (correlation-based) form -
equivalent to computing raw alpha after first standardizing every item
to unit variance. See Details for when this differs meaningfully
from |
sem |
the standard error of measurement (based on raw alpha). |
mean_difficulty |
average item difficulty. |
mean_discrimination_raw |
average raw (uncorrected) item-total correlation across items. |
mean_discrimination_corrected |
average corrected (item-excluded) item-total correlation across items. |
Hwanggyu Lim hglim83@gmail.com
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16(3), 297-334. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02310555")}.
Osburn, H. G. (2000). Coefficient alpha and related internal consistency reliability coefficients. Psychological Methods, 5(3), 343-355. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/1082-989X.5.3.343")}.
ctt_item(), score_resp()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.