Calculates Cronbach's alpha (Cronbach, 1951), a coefficient of internal consistency. The coefficient typically serves as an estimate of the reliability of a psychometric test.

1 | ```
cronbach.alpha(x, standardized = FALSE)
``` |

`x` |
A numeric data.frame/matrix with rows and columns corresponding to individuals and items, respectively. |

`standardized` |
A logic indicating whether a standardized Cronbach alpha should be calculated (default is FALSE). |

For a test consisting of *k* items that measures a quantity *X*,
Cronbach's alpha is defined as

*α = (k/k - 1)(1 - (∑_{i=1}^{k}{σ_Y}_i^2/σ_X^2))*

with *X = Y_1 + Y_2 + ... + Y_k*. *{σ_Y}_i^2* is the variance of item *i*,
and *σ_X^2* the variance of the total test score for a sample of individuals that completed the test.

The standardized Cronbach's alpha is defined as

*α_s = (k\overline{r})/(1 + (k - 1)\overline{r})*

where *k* is the number of items and *\overline{r}* the mean correlation between the items.

Cases that have missing values on any of the items are excluded.

Returns Cronbach's alpha as a numeric object.

Cronbach,
L. J. (1951). Coefficient alpha and the internal structure of tests. *Psychometrika*, *16*, 297-334.

cocron, cocron.n.coefficients, cocron.two.coefficients

1 2 3 4 | ```
data("knowledge")
cronbach.alpha(knowledge$test1)
cronbach.alpha(knowledge$test2)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.