Skip to contents

Computes the fit (Generalized TEFI) of a hierarchical or correlated bifactor dimensionality structure (or hierEGA objects) using Von Neumman's entropy when the input is a correlation matrix. Lower values suggest better fit of a structure to the data


genTEFI(data, structure = NULL, verbose = TRUE)



Matrix, data frame, or hierEGA object. Can be raw data or correlation matrix


For high-order and correlated bifactor structures, structure should be a list containing:

  • lower_order --- A vector (length = ncol(data)) representing the first-order structure (numbers or labels for each item in each first-order factor or community)

  • higher_order --- A vector (length = ncol(data) or number of lower_order communities)representing the second-order structure (numbers or labels for each item in each second-order factor or community)


Boolean (length = 1). Whether messages and (insignificant) warnings should be output. Defaults to TRUE to see all messages and warnings for every function call. Set to FALSE to ignore messages and warnings


Returns a three-column data frame of the Generalized Total Entropy Fit Index using Von Neumman's entropy (VN.Entropy.Fit) (first column), as well as Lower.Order.VN - TEFI for the first-order factors (second column), and Higher.Order.VN, the equivalent for the second-order factors.


Hudson Golino <hfg9s at> and Alexander P. Christensen <>


# Example using network scores
opt.hier <- hierEGA(
  data = optimism, scores = "network",
  plot.EGA = FALSE # No plot for CRAN checks
#> Warning: This implementation of `hierEGA` is experimental. 
#> The underlying function and/or output may change until the results have been appropriately vetted and validated.

# Compute the Generalized Total Entropy Fit Index
#>   VN.Entropy.Fit Lower.Order.VN Higher.Order.VN
#> 1      -11.68101      -2.851873        -8.82914