tableCounts function

tableCounts

tableCounts

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

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

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.

Returns

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

Examples

## 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)

Author(s)

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

  • Maintainer: Ted Enamorado
  • License: GPL (>= 3)
  • Last published: 2023-11-17

Useful links