select_threshold: Select pairs for linkage using a threshold

Description Usage Arguments Value Examples

View source: R/select_threshold.R

Description

Select pairs for linkage using a threshold

Usage

1
select_threshold(pairs, threshold, weight, var = "select")

Arguments

pairs

a pairs object, such as generated by pair_blocking

threshold

the threshold to apply. Pairs with a score above the threshold are selected.

weight

name of the score/weight variable of the pairs. When not given and attr(pairs, "score") is defined, that is used.

var

the name of the new variable to create in pairs. This will be a logical variable with a value of TRUE for the selected pairs.

Value

Returns the pairs with the variable given by var added. This is a logical variable indicating which pairs are selected a matches.

Examples

1
2
3
4
5
6
data("linkexample1", "linkexample2")
pairs <- pair_blocking(linkexample1, linkexample2, "postcode")
pairs <- compare_pairs(pairs, c("lastname", "firstname", "address", "sex"))
pairs <- score_simsum(pairs)
# Select pairs with a simsum > 5 as matches
pairs <- select_threshold(pairs, 5)

reclin documentation built on Nov. 23, 2021, 9:09 a.m.