bipartiteGibbs {BRL} | R Documentation |
Gibbs Sampler Used for Beta Record Linkage
Description
Run a Gibbs sampler to explore the posterior distribution of bipartite matchings that represent the linkage of the datafiles in beta record linkage.
Usage
bipartiteGibbs(cd, nIter = 1000, a = 1, b = 1, aBM = 1, bBM = 1, seed = 0)
Arguments
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 |
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 |
Value
a list containing:
Z
matrix with
n2
rows andnIter
columns containing the chain of bipartite matchings. A number smaller or equal ton1
in rowj
indicates the record in datafile 1 to which recordj
in datafile 2 is linked at that iteration, otherwisen1+j
.m,u
chain of
m
andu
parameters in the model for the comparison data among matches and non-matches, respectively.
References
Mauricio Sadinle (2017). Bayesian Estimation of Bipartite Matchings for Record Linkage. Journal of the American Statistical Association 112(518), 600-612. [Published] [arXiv]
Examples
data(twoFiles)
myCompData <- compareRecords(df1, df2, flds=c("gname", "fname", "age", "occup"),
types=c("lv","lv","bi","bi"))
chain <- bipartiteGibbs(myCompData)