Learn R Programming

fastLink (version 0.6.1)

tableCounts: tableCounts

Description

Count pairs with the same pattern in the cross product between two datasets.

Usage

tableCounts(gammalist, nobs.a, nobs.b, n.cores)

Value

tableCounts returns counts of all unique mathching patterns, which can be fed directly into emlinkMAR to get posterior matching probabilities for each unique pattern.

Arguments

gammalist

A list of objects produced by gammaKpar, gammaCK2par, or gammaCKpar.

nobs.a

number of observations in dataset 1

nobs.b

number of observations in dataset 2

n.cores

Number of cores to parallelize over. Default is NULL.

Author

Ted Enamorado <ted.enamorado@gmail.com>, Ben Fifield <benfifield@gmail.com>, and Kosuke Imai

Examples

Run this code
if (FALSE) {
## Calculate gammas
g1 <- gammaCKpar(dfA$firstname, dfB$firstname)
g2 <- gammaCKpar(dfA$middlename, dfB$middlename)
g3 <- gammaCKpar(dfA$lastname, dfB$lastname)
g4 <- gammaKpar(dfA$birthyear, dfB$birthyear)

## Run tableCounts
tc <- tableCounts(list(g1, g2, g3, g4), nobs.a = nrow(dfA), nobs.b = nrow(dfB))
}

Run the code above in your browser using DataLab