Computes the fit of a dimensionality structure using Von Neumman's entropy when the input is a correlation matrix. Lower values suggest better fit of a structure to the data.
vn.entropy(data, structure)
Returns a list containing:
The Entropy Fit Index using Von Neumman's entropy
The total correlation of the dataset
The average entropy of the dataset
A datafram or a correlation matrix
A vector representing the structure (numbers or labels for each item).
Can be theoretical factors or the structure detected by EGA
Hudson Golino <hfg9s at virginia.edu>, Alexander P. Christensen <alexpaulchristensen@gmail.com>, and Robert Moulder <rgm4fd@virginia.edu>
Golino, H., Moulder, R. G., Shi, D., Christensen, A. P., Garrido, L. E., Nieto, M. D., Nesselroade, J., Sadana, R., Thiyagarajan, J. A., & Boker, S. M. (2020). Entropy fit indices: New fit measures for assessing the structure and dimensionality of multiple latent variables. Multivariate Behavioral Research.
EGA
to estimate the number of dimensions of an instrument using EGA and
CFA
to verify the fit of the structure suggested by EGA using confirmatory factor analysis.
# 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