egor
object as a measurement of ego-alter homophilyR/composition.R
comp_ei.Rd
comp_ei()
calculates the EI-Index values as a measurement for ego-alter homo-/heterophily.
comp_ei(object, alt.attr, ego.attr)
An egor
object.
A character
naming the variable containing the alter-attribute.
A character
naming an ego attribute.
A tibble
with the ego ID and a numeric
result vector.
data("egor32")
comp_ei(egor32, "age", "age")
#> # A tibble: 32 × 2
#> .egoID ei
#> <dbl> <dbl>
#> 1 1 0.833
#> 2 2 1
#> 3 3 0.333
#> 4 4 0.833
#> 5 5 0.5
#> 6 6 0.667
#> 7 7 0.333
#> 8 8 0.333
#> 9 9 1
#> 10 10 0.333
#> # … with 22 more rows