Open emstruong opened 2 hours ago
You can use community.detection
on a correlation matrix:
# Example data
data <- wmt2[,7:24]
# Compute correlations
correlations <- auto.correlate(data)
# Set up EGA class object
ega_object <- list(
network = correlations,
wc = community.detection(correlations)
); class(ega_object) <- "EGA"
# Plot
plot(ega_object)
You can use
community.detection
on a correlation matrix:# Example data data <- wmt2[,7:24] # Compute correlations correlations <- auto.correlate(data) # Set up EGA class object ega_object <- list( network = correlations, wc = community.detection(correlations) ); class(ega_object) <- "EGA" # Plot plot(ega_object)
This is great! ...So any chance it could be completely automated as part of one of the EGA
arguments? It's really handy when you're just quickly looking at a dataset that you've never seen before and have little understanding of.
We could create an independent function that performs the code chunk above but we would not incorporate it directly into EGA
Works fine for me!
Is your feature request related to a problem? Please describe. Would it be possible to use
EGA
for just the marginal correlations? Perhaps even use the cluster detections on the marginal correlations?Describe the solution you'd like
EGA(model = c("BGGM", "glasso", "TMFG", "marginal"), ...)
Describe alternatives you've considered Doing it by hand with
library(qgraph)
andlibrary(correlation)
Additional context It'd be really handy...