tefi.compare | R Documentation |
tefi
) Between Two StructuresThis function computes the tefi
values for two different structures using
bootstrapped correlation matrices from bootEGA
and compares them using a
non-parametric bootstrap test. It also visualizes the distributions of tefi
values
for both structures.
tefi.compare(bootega.obj, base, comparison, plot.TEFI = TRUE, ...)
bootega.obj |
A |
base |
Numeric (length = columns in original dataset). A vector representing the base structure to be tested |
comparison |
Numeric (length = columns in original dataset).
A vector representing the structure to be compared against the |
plot.TEFI |
Boolean (length = 1).
Whether the TEFI comparison and the p-value should be plotted.
Defaults to |
... |
Additional arguments that can be passed on to |
The null hypothesis is that the TEFI values obtained in the bootstrapped correlation matrices for the base
structure are than the TEFI values obtained in the bootstrapped correlation matrices for the comparison
structure.
Therefore, the p-value in this bootstrap test can be interpreted as follows:
If the p-value less than 0.05: TEFI values for the base
structure tend to be lower
than the comparison
structure, indicating that the former provides a better fit (lower entropy) than the latter
If the p-value is greater than 0.05: TEFI values for the base
structure are not significantly lower than
the comparison
structure, suggesting that both structures may provide similar fits or that comparison
might fit better
A list containing:
TEFI.df |
A data frame containing the TEFI values for both structures |
p.value |
The p-value from the non-parametric bootstrap hypothesis test |
Hudson Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>
# Obtain data
wmt <- wmt2[,7:24]
## Not run:
# Perform bootstrap EGA
boot.wmt <- bootEGA(
data = wmt, iter = 500,
type = "parametric", ncores = 2
)
## End(Not run)
# Perform comparison
comparing_tefi <- tefi.compare(
boot.wmt,
base = boot.wmt$EGA$wc, # Compare Walktrap
comparison = community.detection(
boot.wmt$EGA$network, algorithm = "louvain"
) # With Louvain
)
# Plot options (UVa colors)
plot(
comparing_tefi,
base.name = "Walktrap", base.color = "#232D4B",
comparison.name = "Louvain", comparison.color = "#E57200"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.