Description Usage Arguments Value References Examples
View source: R/bipartiteGibbs.R
Run a Gibbs sampler to explore the posterior distribution of bipartite matchings that represent the linkage of the datafiles in beta record linkage.
1 | bipartiteGibbs(cd, nIter = 1000, a = 1, b = 1, aBM = 1, bBM = 1, seed = 0)
|
cd |
a list with the same structure as the output of the function
|
nIter |
number of iterations of Gibbs sampler. |
a, b |
hyper-parameters of the Dirichlet priors for the m and u parameters in the model for the comparison data among matches and non-matches, respectively. These can be vectors with as many entries as disagreement levels among all comparison fields. If specified as positive constants, they get recycled to the required length. If not specified, flat priors are taken. |
aBM, bBM |
hyper-parameters of beta prior on bipartite matchings. Default is |
seed |
seed to be used for pseudo-random number generation. By default it sets |
a list containing:
Z
matrix with n2
rows and nIter
columns containing the chain of bipartite matchings.
A number smaller or equal to n1
in row j
indicates the record in datafile 1 to which record j
in datafile 2
is linked at that iteration, otherwise n1+j
.
m,u
chain of m and u parameters in the model for the comparison data among matches and non-matches, respectively.
Mauricio Sadinle (2017). Bayesian Estimation of Bipartite Matchings for Record Linkage. Journal of the American Statistical Association 112(518), 600-612. [Published] [arXiv]
1 2 3 4 5 6 | data(twoFiles)
myCompData <- compareRecords(df1, df2, flds=c("gname", "fname", "age", "occup"),
types=c("lv","lv","bi","bi"))
chain <- bipartiteGibbs(myCompData)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.