tableCounts | R Documentation |
Count pairs with the same pattern in the cross product between two datasets.
tableCounts(gammalist, nobs.a, nobs.b, n.cores)
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. |
tableCounts
returns counts of all unique mathching patterns, which can be
fed directly into emlinkMAR
to get posterior matching probabilities for each unique pattern.
Ted Enamorado <ted.enamorado@gmail.com>, Ben Fifield <benfifield@gmail.com>, and Kosuke Imai
## Not run:
## 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))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.