I have a bunch of data sets in R with problematic cronbach's alphas. These data have no missing values so I calculate alpha with something like:
cronbach <- function(x){
colx <- ncol(x)
value <- (1-sum(apply(x,2,var))/var(apply(x,1,sum)))*(colx/(colx-1))
return(value)}
What I need is a function that not only calculates alpha but also:
- Calculates alpha if an item (column) deleted
Calculates alpha if a case (row) deleted
forDataframe
or Matrix of any reasonable dimension.Thanks in advance.