R/alpha.R

Defines functions alpha

alpha=function(X){
# Cronbach's alpha
 J=ncol(X);
 varX=var(X)
 if(sum(varX) > 0 & length(varX) > 1) J/(J-1)* sum(varX - diag(diag(varX)))/sum(varX) else NA
}

Try the fwdmsa package in your browser

Any scripts or data that you put into this service are public.

fwdmsa documentation built on May 2, 2019, 8:26 a.m.