# assort: Assortativity Coefficient In netseg: Measures of Network Segregation and Homophily

## Description

Assortativity coefficient is a measure of segregation for social networks due to Newman & Girvan (2002).

## Usage

 1 2 3 4 5 6 7 8 9 10 assort(object, ...) ## S3 method for class 'table' assort(object, ...) ## S3 method for class 'igraph' assort(object, vattr, ...) ## Default S3 method: assort(object, ...)

## Arguments

 object R object, see available methods ... other arguments to/from other methods vattr character, name of the vertex attribute for which the measure is to be calculated

## Details

The measure evaluates the relative prevalence of within-group ties. It is based on the contact layer of the mixing matrix.

Assortativity coefficient is 1 if all ties are within-group. The minimum can be negative, but not less than -1, and depends on the relative number of ties of nodes in different groups. If the network conforms to "proportionate mixing", the coefficient is 0.

If object is a table it is interpreted as a mixing matrix. Two-dimensional table is interpreted as a contact layer. Three-dimensional table is interpreted as a full mixing matrix m[ghy] cross-classyfying all dyads, in which g and h correspond to group membership of ego and alter respectively. Layers y=1 and y=2 are assumed to be non-contact and contact layers respectively.

If object is of class "igraph" it is required to supply vattr with the name of the vertex attribute to calculate intermediate mixing matrix.

For any other classes, object is coerced to a table and the table method is called.

## Value

Numeric value of the index.

## References

Newman, M. J. and Girvan, M. (2002) "Mixing patterns and community structure in networks", arXiv:cond-mat/0210146v1

Newman, M. J. (2003) "Mixing patterns in networks" arXiv:cond-mat/0209450v2