Computes standardized and unstandardized Cronbach's alphas for an nR x nI array of nR repetitions of observations of nI items. Cronbach's alpha measures the reliability of psychometric test scores.
A couple other versions of functions for calculating Cronbach's alpha exist on the exchange but are not well documented. Leontitsis' calculates only unstandardized alphas and Nagel's calculates standardized scores but uses Spearman correlation instead of Pearson.
This function calculates both and uses Pearson correlations.
Alex Schlegel (2021). Cronbach's Alpha (https://www.mathworks.com/matlabcentral/fileexchange/38320-cronbach-s-alpha), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Should include nanmean, corrcoef(..., 'rows', 'complete'), and cov(..., 'omitrows') in order to accomodate inputs with NaN values.
Hi Ben, I am not sure, but I just used the formula from the Wikipedia article on Cronbach's alpha, which looks like it derives from eq. 44 of the original paper (doi:10.1007/bf02310555). That equation appears to refer to straight means of correlations, rather than using Fisher z-transforms.
Thanks for the function!
Small comment: When calculating the mean of correlations, shouldn't one use Fisher z-transformed values and then transform back? So, tanh(mean(atanh(r))) instead of mean(r)?