score_problink: Score comparison patterns of pairs using the probabilistic...

Description Usage Arguments Value Examples

View source: R/score_problink.R

Description

Score comparison patterns of pairs using the probabilistic linkage framework

Usage

1
score_problink(pairs, model = NULL, var = "weight", add = TRUE, ...)

Arguments

pairs

a pairs object, such as generated by pair_blocking

model

an object of type problink_em containing the estimated m- and u-probabilities. When NULL or missing a model is estimated.

var

the name of the new variable that will be created (also see details).

add

add the estimated score to the pairs object and return the pairs object. Otherwise, just the scores are returned.

...

passed on to predict.problink_em.

Value

When add = TRUE, the pairs object is returned with the scores added to it. The new column will have the name var unless additional arguments are passed on to predict.problink_em using the ... argument that causes the calculation of multiple scores (such are type = "all"). In that case the text given by var is prepended to the names of the variables returned by predict.problink_em (with a separator '_').

When add = FALSE the scores are returned as is.

Examples

1
2
3
4
5
6
7
8
data("linkexample1", "linkexample2")
pairs <- pair_blocking(linkexample1, linkexample2, "postcode")
pairs <- compare_pairs(pairs, c("lastname", "firstname", "address", "sex"))
pairs <- score_problink(pairs)

# is the same as
model <- problink_em(pairs)
pairs <- score_problink(pairs, model = model)

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