A pre-built domain comparison for dates of birth. Combines exact matching, a Damerau-Levenshtein string check for transposed digits, and configurable date-difference levels to handle common errors.
Arguments
- thresholds
A list of unit-tagged threshold values created by
days(),months(), oryears(), ordered from strictest to most lenient. Defaults tolist(months(1), years(1), years(10)).- term_frequency
Logical. If
TRUE, adjust match weights by date-of-birth frequency at the highest comparison level. Defaults toFALSE.
Value
A comparison-level object for use in il_compare().
Examples
il_spec() |>
il_compare(dob, cl_dob())
#> Linkage Specification
#> Comparisons (1):
#> dob : levels
#> Blocking rules: (none)
# Custom thresholds: within 7 days, 6 months, 2 years
il_spec() |>
il_compare(dob, cl_dob(thresholds = list(days(7), months(6), years(2))))
#> Linkage Specification
#> Comparisons (1):
#> dob : levels
#> Blocking rules: (none)
