coleman: Coleman's homophily index

Description Usage Arguments Details Value References See Also Examples

View source: R/coleman.R

Description

Colemans's homphily index for directed networks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
coleman(object, ...)

## S3 method for class 'table'
coleman(object, gsizes = NULL, loops = FALSE, ...)

## S3 method for class 'igraph'
coleman(object, vattr, ...)

## Default S3 method:
coleman(object, ...)

Arguments

object

R object, see Details for available methods

...

other arguments passed to/from methods

gsizes

numeric vector of group sizes

loops

logical, whether loops are allowed

vattr

character, vertex attribute

Details

Coleman's homophily index computes homophily scores for each group defined by a vertex attribute.

If object is a table it is interpreted as a mixing matrix. If it is only the contact layer (2-dimensional), then vector of group sizes need to be supplied via gsizes.

object can be of class "igraph"

Default method tries to coerce object to table and use other methods.

Value

Vector of numeric values of the index for each group

References

Coleman, J. (1958) "Relational analysis: The study of social organizations with survey methods", Human Organization 17:28–36.

See Also

Other segregation measures: assort, ei, freeman, gamix, orwg, smi, ssi

Examples

1
2
3
4
if( require(igraph, quietly = TRUE)) {
  coleman(as.directed(Wnet, "mutual"), "gender")
  coleman(as.directed(EFnet, "mutual"), "type")
}

mbojan/isnar documentation built on Feb. 18, 2021, 4:38 a.m.