number_ties {ERPM} | R Documentation |
Same pairs of individuals in a partition
Description
This function computes the number of ties.
Usage
number_ties(partition, dyadic_attribute, stat)
Arguments
partition |
A partition (vector) |
dyadic_attribute |
A matrix containing the values of the attribute |
stat |
The statistic to compute : 'avg_pergroup' for the average per group , 'sum_pergroup' for the sum, 'sum_perind' and 'avg_perind' for the number of ties per individuals each individual has in its group. |
Value
The statisic chosen in stat
Examples
p <- c(1,2,2,3,3,4)
v <- c(0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0)
at <- matrix(v,6,6, byrow = TRUE)
number_ties(p,at,'avg_pergroup')
[Package ERPM version 0.2.0 Index]