Learn R Programming

EGAnet (version 0.5)

EGA.fit: EGA Optimal Model Fit using Entropy

Description

Estimates the best fitting model using EGA. The number of steps in the cluster_walktrap detection algorithm is varied and unique community solutions are compared using entropyFit.

Usage

EGA.fit(data, model = c("glasso", "TMFG"), steps = c(3, 4, 5, 6, 7, 8))

Arguments

data

A dataset

model

A string indicating the method to use. Current options are:

  • glasso Estimates the Gaussian graphical model using graphical LASSO with extended Bayesian information criterion to select optimal regularization parameter. This is the default method

  • TMFG Estimates a Triangulated Maximally Filtered Graph

steps

Range of steps to be used in the model selection. Defaults from 3 to 8 steps (based on Pons & Latapy, 2006)

Value

Returns a list containing:

EGA

The EGA output for the best fitting model

steps

The number of steps used in the best fitting model from the cluster_walktrap algorithm

EntropyFit

The Entropy Fit Index for the unique solutions given the range of steps (vector names represent the number of steps)

Lowest.EntropyFit

The lowest value for the Entropy Fit Index

References

Pons, P., & Latapy, M. (2006). Computing communities in large networks using random walks. Journal of Graph Algorithms and Applications, 10, 191-218. doi:10.7155/jgaa.00185

See Also

bootEGA to investigate the stability of EGA's estimation via bootstrap, 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.

Examples

Run this code
# NOT RUN {
#estimate normal EGAtmfg
tmfg <- EGA(data = wmt2[,7:24], model = "TMFG")

#estimate optimal EGAtmfg
tmfg.opt <- EGA.fit(data = wmt2[,7:24], model = "TMFG")

#estimate Entropy Fit Index
entropyFit(data = wmt2[,7:24], structure = tmfg.opt$EGA$wc)$Entropy.Fit
entropyFit(data = wmt2[,7:24], structure = tmfg$wc)$Entropy.Fit
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab