Calculate the EI-Indices of an egor
object as a measurement of ego-alter homophily
Source: R/composition.R
comp_ei.Rd
comp_ei()
calculates the EI-Index values as a measurement for ego-alter homo-/heterophily.
Arguments
- object
An
egor
object.- alt.attr
A
character
naming the variable containing the alter-attribute.- ego.attr
A
character
naming an ego attribute.
Examples
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
#> # ℹ 22 more rows