getFactions {mFLICA}R Documentation

getFactions function

Description

getFactions is a support function for inferring faction leaders and their members as well as a faction size ratio of each faction. Leaders are nodes that have zero outgoing degree. Members of leader A's faction are nodes that have some directed path to A in a following network.

Usage

getFactions(adjMat)

Arguments

adjMat

is an adjacency matrix of a following network.

Value

This function returns a list of leader IDs, a list of faction members, and network densities of factions.

leaders

is a list of faction leader IDs

factionMembers

is a list of members of factions where factionMembers[[i]] is a list of faction members of a leader leaders[i]'s faction.

factionSizeRatio

is a vector of faction size ratio of each faction. factionSizeRatio[i] is a number of edges within a leader leaders[i]'s faction divided by N choose 2 where N is a number of all nodes.

Examples

# Given an example of adjacency matrix
A<-matrix(FALSE,5,5)
A[2,1]<-TRUE
A[c(3,4),2]<-TRUE
A[5,3]<-TRUE
# Get faction leaders and their members as well as a network density of each faction.

out<-getFactions(adjMat=A)


[Package mFLICA version 0.1.5 Index]