Skip to contents

Stage 2 of cross-org linkage: turns each candidate pair from candidate_pairs() into a Fellegi-Sunter-style additive match score, reusing the within-org weighting (default_weights(), score_pairs()) but computing every field similarity from the person variant sets rather than a single string:

  • last_name – best match over last_name_variants_a x _b (compare_two_names()), frequency-adjusted by the population surname rarity (population_surname_weight());

  • first_name – best match over first_name_variants with nickname and initial handling (compare_first_names());

  • middle_name, suffix – set overlap of the initials / suffixes (agree / disagree / neutral-if-missing);

  • gender – exact agreement of the modal genders.

Title is deliberately excluded – per the interlock design it is a downstream edge filter, not a linkage signal.

Usage

score_candidate_pairs(
  cand,
  profiles,
  weights = default_weights(),
  surname_weight = NULL,
  components = FALSE
)

Arguments

cand

Candidate pairs from candidate_pairs() (emp_a, emp_b, ...).

profiles

The profiles those ids index (from build_person_profile()).

weights

Named base weights; see default_weights().

surname_weight

Optional precomputed population_surname_weight() vector; built from profiles if NULL.

components

If TRUE, also return the per-field similarity columns (sim_last, sim_first, ...) for inspection/tuning.

Value

cand with an added numeric score column (and, if components, the per-field similarities), sorted by descending score.