This calculates Burt's network constraint for all egos in an egor object. It iterates over each network and applies igraph::constraint. A weight variable can be specified.

ego_constraint(object, weights = NULL, ego.alter.weights = weights)

## Arguments

object An egor object. Character, naming the alter-alter tie weight variable. Character, naming the ego-alter weight tie weight variable. This defaults to the same value as weights, only specify if the name of the ego.alter.weights is different from weights.

## Value

Numeric vector with a constraint value for each ego.

## Details

The calculation of weighted network constraint only works, if the alter-alter tie weights are complemented by a alter level variable specifying the same weight for the ego-alter ties.

## References

Burt, R. (2004). Structural holes and good ideas. American Journal of Sociology, (110), 349–399.

## Examples

data(egor32)
ego_constraint(egor32)#>         1         2         3         4         5         6         7         8
#> 0.3967578 0.1907957 0.2261930 0.2122561 0.3286755 0.2158100 0.3108291 0.2086580
#>         9        10        11        12        13        14        15        16
#> 0.3455864 0.2911842 0.1980264 0.2643819 0.1687359 0.1744945 0.2237644 0.3174204
#>        17        18        19        20        21        22        23        24
#> 0.1611907 0.1557168 0.3779919 0.3321179 0.2130784 0.1827778 0.2381930 0.3126283
#>        25        26        27        28        29        30        31        32
#> 0.3041659 0.3694840 0.2235129 0.1812745 0.1842145 0.5108488 0.2927829 0.1740681