Description Usage Arguments Value Author(s) See Also Examples

View source: R/endogenousstats.R

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 necessary 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).

1 2 3 4 5 6 7 8 | ```
sharedPartner_stat(
graph,
directed,
weighted = TRUE,
triad.type = "undirected",
nodes = NULL,
zero_values = NULL
)
``` |

`graph` |
A graph adjacency matrix or an edgelist. The edgelist needs to have 3 columns: a sender vector, a target vector and an edgecount vector. |

`directed` |
boolean. Is the graph directed? |

`weighted` |
set to TRUE. |

`triad.type` |
set to |

`nodes` |
optional character/factor vector. If an edgelist is provided, 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). |

`zero_values` |
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, ideally using a dummy variable fitting an optimal value for the zeroes. |

Shared partner change statistic matrix.

LB, GC, GV

`reciprocity_stat`

or `homophily_stat`

1 2 3 | ```
tri_stat <- sharedPartner_stat(adj_karate, directed = FALSE)
tri_stat_dummy <- get_zero_dummy(tri_stat, name = 'shared_partners')
nrm(w=tri_stat_dummy, adj_karate, directed = FALSE, selfloops = FALSE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.