reclin (version 0.1.1)

score_problink: Score comparison patterns of pairs using the probabilistic linkage framework

Description

Score comparison patterns of pairs using the probabilistic linkage framework

Usage

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

Run this code
# NOT RUN {
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)

# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace