run_EGA_combinations: Run EGA Combinations

View source: R/run_EGA_combinations.R

run_EGA_combinationsR Documentation

Run EGA Combinations

Description

Runs EGA with multiple combinations of correlation methods and algorithms.

Usage

run_EGA_combinations(
  data,
  corr = c("cor_auto", "pearson", "spearman"),
  algorithm = c("leiden", "louvain", "walktrap"),
  leiden_args = list(objective_function = "CPM", resolution_parameter = 1)
)

Arguments

data

Data frame with the data.

corr

Character vector of correlation methods.

algorithm

Character vector of community detection algorithms.

leiden_args

List of additional arguments for the Leiden algorithm.

Value

A list of EGA results with class "EGA_combinations".

Examples

set.seed(123)
n <- 300
f1 <- rnorm(n)
f2 <- 0.3 * f1 + rnorm(n)
items <- data.frame(
  sapply(1:4, function(i) 0.7 * f1 + rnorm(n, 0, 0.7)),
  sapply(1:4, function(i) 0.7 * f2 + rnorm(n, 0, 0.7))
)
names(items) <- c(paste0("A", 1:4), paste0("B", 1:4))

combos <- run_EGA_combinations(items, corr = c("pearson", "spearman"),
                               algorithm = c("louvain", "walktrap"))
names(combos)

InterconectaR documentation built on Oct. 16, 2026, 1:06 a.m.