reclin (version 0.1.1)

predict.problink_em: Calculate weights and probabilities for pairs

Description

Calculate weights and probabilities for pairs

Usage

# S3 method for problink_em
predict(object, pairs = newdata, newdata = NULL,
  type = c("weights", "mpost", "probs", "all"), binary = FALSE, comparators,
  ...)

Arguments

object

an object of type problink_em as produced by problink_em.

pairs

a object with pairs for which to calculate weights.

newdata

an alternative name for the pairs argument. Specify newdata or pairs.

type

a character vector of length one specifying what to calculate. See results for more information.

binary

convert comparison vectors to binary vectors using the comparison function in comparators.

comparators

a list of comparison functions (see compare_pairs). When missing attr(pairs, 'comparators') is used.

...

unused.

Value

In case of type == "weights" returns a vector (lvec or regular R-vector depending on the type of pairs). with the linkage weights. In case of type == "mpost" returns a vector with the posterior m-probabilities (probability that a pair is a match). In case of type == "probs" returns a data.frame or ldat with the m- and u-probabilities and posterior m- and u probabilities. In case type == "all" returns a data.frame or ldat with both probabilities and weights.