Skip to contents

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

Usage

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 × 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