Learn R Programming

EGAnet (version 1.2.3)

infoCluster: Information Theoretic Mixture Clustering for dynEGA

Description

Performs hierarchical clustering using Jensen-Shannon distance followed by the Louvain algorithm with consensus clustering. The method iteratively identifies smaller and smaller clusters until there is no change in the clusters identified

Usage

infoCluster(dynEGA.object, plot.cluster = TRUE)

Value

Returns a list containing:

clusters

A vector corresponding to cluster each participant belongs to

clusterTree

The dendogram from hclust the hierarhical clustering

clusterPlot

Plot output from results

JSD

Jensen-Shannon Distance

Arguments

dynEGA.object

A dynEGA or a dynEGA.ind.pop object that is used to match the arguments of the EII object.

plot.cluster

Boolean. Should plot of optimal and hierarchical clusters be output? Defaults to TRUE. Set to FALSE to not plot

Author

Hudson Golino <hfg9s at virginia.edu> & Alexander P. Christensen <alexander.christensen at Vanderbilt.Edu>

Examples

Run this code
# Obtain data
sim.dynEGA <- sim.dynEGA # bypasses CRAN checks

if (FALSE) {
# Dynamic EGA individual and population structure
dyn.ega1 <- dynEGA.ind.pop(
  data = sim.dynEGA, n.embed = 5, tau = 1,
  delta = 1, id = 25, use.derivatives = 1, 
  ncores = 2, corr = "pearson"
)

# Perform information-theoretic clustering
clust1 <- infoCluster(dynEGA.object = dyn.ega1)}

Run the code above in your browser using DataLab