# make data with missing values
missing_mtcars <- mtcars
for(i in 1:20){
missing_mtcars[sample(1:nrow(mtcars),1),sample(1:ncol(mtcars),1)]<-NA
}
covmat<-covEM(as.matrix(missing_mtcars))$sigma
calpha(covmat)
Run the code above in your browser using DataLab