cliques: Identify Cliques in a Transition Network

View source: R/cliques.R

cliquesR Documentation

Identify Cliques in a Transition Network

Description

This function identifies cliques of a specified size in a transition network. It searches for cliques, i.e., complete subgraphs where every pair of nodes is connected, of size n in the transition matrix for the specified cluster in the tna object.

Usage

cliques(x, ...)

## S3 method for class 'tna'
cliques(x, size = 2, threshold = 0, sum_weights = FALSE, ...)

## S3 method for class 'group_tna'
cliques(x, size = 2, threshold = 0, sum_weights = FALSE, ...)

Arguments

x

A tna or a group_tna object.

...

Ignored.

size

An integer specifying the size of the cliques to identify. Defaults to 2 (dyads).

threshold

A numeric value that sets the minimum edge weight for an edge to be considered in the clique. Edges below this value are ignored. Defaults to 0.

sum_weights

A logical value specifying whether the sum of the weights should be above the threshold instead of individual weights of the directed edges. Defaults to FALSE.

Value

A tna_cliques object which is a list of two elements:

  • weights is a matrix of the edge weights in the clique.

  • inits is a numeric vector of initial weights for the clique.

If x is a group_tna object, a group_tna_cliques object is returned instead, which is a list or tna_cliques objects.

See Also

Clique-related functions plot.group_tna_cliques(), plot.tna_cliques(), print.group_tna_cliques(), print.tna_cliques()

Examples

model <- tna(group_regulation)

# Find  2-cliques (dyads)
cliq <- cliques(model, size = 2)

model <- group_tna(engagement_mmm)
cliques(model)


tna documentation built on June 8, 2025, 10:33 a.m.