Measure Homophily with Mixing Matrices
Compare observed within-group and between-group ties with available opportunities instead of equating raw same-group counts with preference.
Method sources
By the end of this tutorial
- 1Define categorical homophily and mixing matrices from an explicit node, tie, boundary, direction, weight, and observation-window specification.
- 2Apply and audit this procedure: Build a group-by-group edge mixing matrix, convert counts to proportions, compare observed same-group ties with composition and opportunity baselines, and report uncertainty for small cells.
- 3Interpret the result with a sensitivity check and the following evidence boundary: Same-group concentration can arise from group size, schedules, residence, boundary rules, or missing data and must not be presented as prejudice or free preference without stronger evidence.
SNA
Network specification
Analysis scenario
A multilingual school asks whether friendship networks cross language groups, but the groups differ greatly in size and timetable overlap.
Nodes
All consenting students in the participating year group with language group and timetable opportunity recorded as attributes.
Ties
An undirected friendship nomination retained when either student reports the relationship, with reciprocity stored separately.
Network type
One-mode, undirected, binary whole network with categorical language attributes, unequal group sizes, retained isolates, and one survey wave.
Step-by-step tutorial
Freeze the relational question
Write the decision the analysis must inform, then lock the eligible node roster, tie-generating event, direction, weight, self-tie rule, observation window, and missing-data code. Preserve a read-only source copy and record why this specification represents the stated question.
Checkpoint
A second analyst can reconstruct the same node set and edge table from the written rules without guessing what an absent record means.
Compute the focal structure
Work on a versioned analysis copy and carry out the focal method exactly as specified: Build a group-by-group edge mixing matrix, convert counts to proportions, compare observed same-group ties with composition and opportunity baselines, and report uncertainty for small cells. Save software and package versions, every threshold, normalization, seed, and intermediate count needed to reproduce the result.
Checkpoint
The output is tied to one named data version and includes the denominator, parameter settings, and a reproducible calculation record.
Run a structural sensitivity check
Repeat the analysis under at least one defensible alternative boundary, missingness rule, tie threshold, weight transformation, or model setting. Compare membership and substantive conclusions, not only a single coefficient, and investigate every change large enough to alter a decision.
Checkpoint
The audit states which patterns persist, which actors or groups change classification, and which conclusion depends on an analyst choice.
Report for responsible action
Pair the numerical result with a table or structure-preserving visual, document excluded and missing actors, and explain uncertainty in plain language. Convert the finding into a reversible support question, not an automatic ranking, while stating this boundary: Same-group concentration can arise from group size, schedules, residence, boundary rules, or missing data and must not be presented as prejudice or free preference without stronger evidence.
Checkpoint
The final note contains the question, specification, result, sensitivity evidence, uncertainty, privacy controls, and a proportionate next step.
Interpret with care
categorical homophily and mixing matrices describes a property of the specified relation and network boundary. It does not transfer automatically to another relation, time period, class, platform, or population.
Same-group concentration can arise from group size, schedules, residence, boundary rules, or missing data and must not be presented as prejudice or free preference without stronger evidence. Compare the result with raw counts, missingness, plausible alternative specifications, and contextual evidence before acting.