Score cross-organization candidate pairs from their profiles
score_candidate_pairs.RdStage 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 overlast_name_variants_a x _b(compare_two_names()), frequency-adjusted by the population surname rarity (population_surname_weight());first_name– best match overfirst_name_variantswith 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 fromprofilesifNULL.- 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.