Score all candidate cross-year pairs (for evaluation and threshold tuning)
candidate_scores.RdReturns every candidate pair the linker would consider – blocked on organization, across all year pairs – with its match score and the raw name fields of both sides, but without applying any threshold or one-to-one selection. This is the input to threshold tuning and labeling.
Usage
candidate_scores(
df,
cols = synthid_cols(),
weights = default_weights(),
fields = c("name", "first_name", "middle_name", "last_name", "suffix", "gender")
)Arguments
- df
A raw panel (as for
link_panel()).- cols
Column mapping; see
synthid_cols().- weights
Named base weights; see
default_weights().- fields
Raw fields to attach for each side (suffixed
_x/_y).
Value
A data frame, one row per candidate pair: row_x, row_y, yr_x,
yr_y, org, score, surname_w_x, surname_w_y, and the requested
fields for each side.
Examples
if (FALSE) { # \dontrun{
cs <- candidate_scores(panel)
hist(cs$score)
} # }