cronbach | R Documentation |
This function allows to calculate the sample Cronbach's α coefficient as an estimate of the reliability (understood in this case under the internal consistency point of view) of the responses collected through Likert-type, visual analogue, and interval-valued rating scales in questionnaires.
cronbach(data, ivs = TRUE, type = 1, theta = 1)
data |
A |
ivs |
A |
type |
A single
|
theta |
A single positive real number stored as a unique |
For both traditional Likert-type and visual analogue rating scales responses,
the sample Cronbach's α coefficient (Cronbach, 1951) computed by
cronbach()
function is defined as follows,
\widehat{α} = \frac{k}{k - 1}≤ft(1 - \frac{∑_{j=1}^{k} s_{X_{j}}^2}{s_{X_{total}}^2}\right),
where k>1 is the number of items; s_{X_{j}}^2 is the sample variance of X_{j}, which is the real-valued random variable modeling the responses to the j-th item; and s_{X_{total}}^2 is the sample variance of the sum of all the involved items, that is,
X_{total}=X_{1}+X_{2}+… +X_{k}.
Analogously, for interval-valued scale responses the sample Cronbach's α coefficient computed by this function is defined as follows,
\widehat{α} = \frac{k}{k - 1}≤ft(1 - \frac{∑_{j=1}^{k} s_{\mathcal{X}_{j}}^2}{s_{\mathcal{X}_{total}}^2}\right),
where k>1 is the number of items; s_{\mathcal{X}_{j}}^2 is the sample Fréchet variance of \mathcal{X}_{j}, which is the interval-valued random set modeling the responses to the j-th item; and s_{\mathcal{X}_{total}}^2 is the sample Fréchet variance of the sum of all the involved items, that is,
\mathcal{X}_{total} = \mathcal{X}_{1}+\mathcal{X}_{2}+… +\mathcal{X}_{k}.
This function returns the calculated sample Cronbach's
α coefficient stored as a single numeric
value for measuring the reliability or internal consistency
of the given questionnaire's responses.
José García-García garciagarjose@uniovi.es
Cronbach L.J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16, 297-334. doi: 1001007/BF02310555.
## These code lines illustrate Cronbach's alpha coefficient calculation ## for interval-valued, Likert-type, and visual analogue scales responses ## Some trivial cronbach() examples ## Cronbach's alpha index for interval-valued scale responses stored ## in a matrix with the inf/sup-characterization variable by variable ## using Bertoluzza's distance with Lebesgue measure (theta = 1/3) data1 <- matrix(c(1, 2.6, 1.5, 3, 3.8, 6, 4, 7), 2, 4) cronbach(data1, theta = 1/3) ## Cronbach's alpha index for interval-valued scale responses stored ## in a data.frame with the mid/spr-characterization saving all the ## mid-points and then all the spreads using rho2 distance (theta = 1) data2 <- data.frame(mids1 = c(2, 3), mids2 = c(4, 5), sprs1 = c(1, 2), sprs2 = c(2, 4)) cronbach(data2, type = 4) ## Cronbach's alpha coefficient for Likert-type ## scale responses stored in a matrix data3 <- matrix(c(1, 3, 4, 7), 2, 2) cronbach(data3, ivs = FALSE) ## Cronbach's alpha coefficient for visual analogue ## scale responses stored in a data.frame data4 <- data.frame(item1 = c(1.5, 2.8), item2 = c(3.9, 6.2)) cronbach(data4, ivs = FALSE) ## Real-life data example ## Load the interval-valued data data(lackinfo, package = "IntervalQuestionStat") ## Calculate Cronbach's alpha coefficient for interval-valued responses cronbach(lackinfo[, 3:12]) ## Convert interval-valued responses into their corresponding equivalent ## Likert-type answers and then calculate Cronbach's alpha coefficient likert <- ivs2likert(IntervalMatrix(lackinfo[, 3:12])) cronbach(likert, ivs = FALSE) ## Analogously, interval-valued responses are transformed into their ## corresponding equivalent visual analogue scale answers and ## Cronbach's alpha coefficient is then computed vas <- ivs2vas(IntervalMatrix(lackinfo[, 3:12])) cronbach(vas, ivs = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.