Calculate (un-)weighted shared partner change statistics for multi-edge graphs.
The function calculates the change statistic for shared partners for each dyad in the graph. Shared partner statistics count for each dyad involving nodes i and j in the graph, how many nodes k these two nodes have in common (or share). The shared partner $k$ counts are weighted by their interactions with the focal nodes $i$ and $j$. This is neccessary in dense multi-edge graphs to ensure that meaningful triadic closure is detected. The statistic can be calculated in 3 different forms: undirected, incoming shared partners (where shared partner k: k->i and k->j) and outgoing shared partners (where shared partner k: k<-i and k<-j).
sharedPartner_stat( graph, directed, weighted = TRUE, triad.type = "undirected", nodes = NULL, zero_values = NULL )
A graph adjacency matrix or an edgelist. The edgelist needs to have 3 columns: a sender vector, a target vector and an edgecount vector.
boolean. Is the graph directed? If
zero_valuesis not specified, the 0.1 is used instead.
set to TRUE.
undirected. Can be set to
outgoinginstead. This then corresponds to directd triadic closure in the multi-edge graph.
optional character/factor vector. If an edgelist is provied, you have to provide a list of unique identifiers of your nodes in the graph. This is because in the edgelist, isolates are usually not recorded. If you do not specify isolates in your nodes object, they are excluded from the analysis (falsifies data).
optional numeric value. Use this to substitute zero-values in your shared partner change statistic matrix. Zero values in the predictors are recognized in the gHypEG regression as structural zeros. To ensure this does not happen, please recode your zero-values in all your predictors.
Shared partner change statistic matrix.