dyadic: Computes dyadic Blau status measures.

View source: R/dyadic.R

dyadicR Documentation

Computes dyadic Blau status measures.

Description

Computes six dyadic measures (computed for each edge in the edgelist). They are Euclidean Distance, Mahalanobis Distance, Co-nichers, Co-outsiders, Straddlers, Spanners.

Usage

dyadic(blauObj, dev.range, ecologies.off = FALSE, m.dist = TRUE)

Arguments

blauObj

An object of class blau initialized with the function blau. Individuals will automatically be placed in niches with the function niches if this has not been done manually.

dev.range

When creating niches, indicates standard deviation around the mean in each dimension to include in niche. A larger value will make niches larger and therefore include more individuals.

ecologies.off

Defaults to FALSE. If set to TRUE, treats all individuals as in the same ecology, even if ecology identifiers (ecology.ids) have been specified. Will call the niches function and overwrite its output even if it has been manually called by the user.

m.dist

Defaults to FALSE. If TRUE, Mahalanobis distance will be computed in addition to Euclidean distance.

Details

All measures are at the edge-level of analysis and characterize ties/dyads rather than individuals/nodes.

Euclidean Distance: is the euclidean distance between two nodes in the edge

Mahalanobis Distance: is euclidean distance standardized by the unit of measurement

Co-nichers: are ties that are located within the same niche. A 0 indicates that both nodes of the tie do not share any niche in common. A 1 indicates that both nodes of the tie belong to only one common niche. A number of 2 or more indicates that the nodes of the tie share more than 1 common niche.

Co-outsiders: is an indicator variable that denotes ties where both nodes do not belong to any niche.

Straddlers: is an indicator variable that denotes ties where one node belongs to at least one niche and the other node does not belong to any niche.

Spanners: is an indicator variable that denotes ties where one node belongs to one niche and the other node belongs to a different niche.

Value

Returns a matrix stored in object$dyadic that contains eight columns. The first two contain the ego and alter for the edge, and the next six contain the dyadic measures.

Examples

data(BSANet)
square.data <- BSANet$square.data
el <- BSANet$el #edgelist
adj <- BSANet$adj #adjacency matrix

b <- blau(square.data, node.ids = 'person', ecology.ids = 'city', graph = el)
#implicitly a directed edgelist
#will automatically compute niches
b <- dyadic(b, dev.range = rep(1.5, 3)) # 3 is the number of dimensions

#adjacency matricies are also OK
b <- blau(square.data, node.ids = 'person', ecology.ids = 'city', graph = adj)
#will automatically compute niches
b <- dyadic(b, dev.range = rep(1.5, 3)) # 3 is the number of dimensions

Blaunet documentation built on Sept. 27, 2022, 9:05 a.m.