mlvl: Construct Multilevel Networks

mlvlR Documentation

Construct Multilevel Networks

Description

Function to construct multilevel networks from multimodal structures.

Usage

mlvl(x, y, type = c("bpn", "cn", "cn2"), symCdm, diag, lbs)

Arguments

x

Array or matrix with domain data.

y

(optional for "cn") Dataframe or list of dataframes with codomain data associated to x.

type

Type of multilevel system to construct:

  • bpn for a binomial projection

  • cn for a common membership network

  • cn2 for a co-affiliation of network members

symCdm

(optional and logical) Symmetrize codomains in binomial projection?

diag

(optional and logical) Include entries of the diagonal in matrices?

lbs

(optional) Either a list of length two with domain and codomain element labels or a vector with relation names in multilevel system.

Details

The inputs in x and y accept multiplex networks and an affiliation network that is high dimensional.

The default multilevel system is a binomial projection bpn that requires data for the two domains, and where the projection is on the system codomain as a directed structure. Making symmetric the codomain structure with symCdm can be convenient for the visualization of multilevel graphs as with mlgraph, and for similar practical reasons, self-relations can be removed from the multilevel structure by disabling diag.

A co-affiliation of network members with option cn2 requires both inputs as well, and the codomain structure in this case is symmetric. However, a common membership network with option cn does not need input in “x” since it returns only the co-affiliation of network members from the codomain structure in y as in cn2.

Since these are different components in the multilevel system for co-affiliation of network members, it is possible to specify the domain and codomain labels in lbs as a list object of length two. Option lbs as a vector can serve instead to label the relation types in the multilevel structure, which may be needed when the codomain in y is just a data frame.

Value

A list object of ‘Multilevel’ class with the chosen type in attribute.

mlnet

multilevel network with domain (unless cn) and projected codomain

lbs

(list) domain and codomain labels

modes

vector with either 1M for domain or 2M for codomain in mlnet

See Also

mlgraph, multigraph

Examples

# array for the domain
arr1 <- round( replace( array(runif(18), c(3,3,2)), array(runif(18), c(3,3,2))>.9, 3 ) )

# rectangle array for the co-domain
arr2 <- round( replace( array(runif(12), c(3,2,2)), array(runif(12), c(3,2,2))>.9, 3 ) )

# multilevel system with default type
mlvl(arr1, arr2)

multiplex documentation built on July 30, 2026, 5:13 p.m.