comp_ei() calculates the EI-Index values as a measurement for ego-alter homo-/heterophily.

comp_ei(object, alt.attr, ego.attr)

Arguments

object

An egor object.

alt.attr

A character naming the variable containing the alter-attribute.

ego.attr

A character naming an ego attribute.

Value

A tibble with the ego ID and a numeric result vector.

Examples

data("egor32") comp_ei(egor32, "age", "age")
#> # A tibble: 32 x 2 #> .egoID result #> <chr> <dbl> #> 1 1 1 #> 2 2 0.895 #> 3 3 0.875 #> 4 4 0.412 #> 5 5 1 #> 6 6 0.875 #> 7 7 1 #> 8 8 0.412 #> 9 9 0.111 #> 10 10 -0.0909 #> # … with 22 more rows