alpha.cronbach(x)
The reliability $\rho$ of any item is defined as the ratio of two variances: the variance of the true (unobserved) measure and the variance of the observed measure. Under the parallel model (see Lord and Novick, 1968), it can be shown that $$\rho=\frac{\sigma^2_a}{\sigma^2_a+\sigma^2_\epsilon}$$ where $\sigma^2_a$ corresponds to the between-subject variability while $\sigma^2_\epsilon$ is the variance of the measurement error. It is possible to prove that $\rho$ is also the constant correlation between any two items. The reliability of the sum of $k$ items is given by the well-known Spearman-Brown formula: $$\tilde\rho=\frac{k\rho}{k\rho+(1-\rho)}.$$ The maximum likelihood estimate of $\tilde\rho$, under the assumption of Normal distribution for the error, is known as the Cronbach alpha coefficient, denoted with $\alpha$.
The formula for computing $\alpha$ is given by $$\alpha=\frac{k}{k-1}\left[1-\frac{\sum_{j=1}^n s^2_j}{s^2_{TOT}}\right]$$ where $s^2_j=1/(n-1) * \sum_{i=1}^n (X_{ij}-\bar X_j)^2$, $s^2_{TOT}=1/(nk-1) * \sum_{i=1}^n \sum_{j=1}^k(X_{ij}-\bar X)^2$, $\bar Xj=1/n * \sum_{i=1}^n X_{ij}$ and $\bar X=1/(nk) * \sum_{i=1}^n \sum_{j=1}^k X_{ij}$.
Lord, F.M. and Novick, M.R. (1968) Statistical Theories of Mental Test Scores. Addison-Wesley Publishing Company, 87--95.
alpha.curve
and cain
data(cain)
out = alpha.cronbach(cain)
out
Run the code above in your browser using DataLab