# Select Five Factor Model personality items only
idx <- na.omit(match(gsub("-", "", unlist(psychTools::spi.keys[1:5])), colnames(psychTools::spi)))
items <- psychTools::spi[,idx]
if (FALSE) # Estimate EGA
ega.spi <- EGA(data = items, model = "glasso")
# Compute entropy indices
vn.entropy(
data = ega.spi$correlation,
structure = ega.spi$wc
)
Run the code above in your browser using DataLab