| coef_alpha | R Documentation |
Computes Cronbach's coefficient alpha from item-level data. Uses listwise-complete cases by default. The implementation follows the standard formula
\alpha = \frac{k}{k-1}\left(1 - \frac{\sum_i s_i^2}{s_T^2}\right)
where k is the number of items, s_i^2 are item variances,
and s_T^2 is the variance of the total score.
coef_alpha(items, na.rm = TRUE)
items |
A data frame, matrix, or list-like object whose columns are item-level responses (one row per respondent). |
na.rm |
Logical. If TRUE (default), use complete cases only. |
A numeric scalar, the value of coefficient alpha.
set.seed(1)
items <- matrix(rnorm(400), ncol = 4)
coef_alpha(items)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.