Cronbach's Alpha if Items/Cases Deleted in R -


i have bunch of data sets in r problematic cronbach's alphas. these data have no missing values calculate alpha 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 need function not calculates alpha also:

  1. calculates alpha if item (column) deleted
  2. calculates alpha if case (row) deleted
    dataframe or matrix of reasonable dimension.

    thanks in advance.


Comments