rl.gibbs: Gibbs sampler for empirically motivated Bayesian record...

Description Usage Arguments Value Examples

View source: R/ebGibbsSampler.R

Description

Gibbs sampler for empirically motivated Bayesian record linkage

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rl.gibbs(
  file.num = file.num,
  X.s = X.s,
  X.c = X.c,
  num.gs = num.gs,
  a = a,
  b = b,
  c = c,
  d = d,
  M = M
)

Arguments

file.num

The number of the file

X.s

A vector of string variables

X.c

A vector of categorical variables

num.gs

Total number of gibb iterations

a

Shape parameter of Beta prior

b

Scale parameter of Beta prior

c

Positive constant

d

Any distance metric measuring the latent and observed string

M

The true value of the population size

Value

lambda.out The estimated linkage structure via Gibbs sampling

Examples

1
2
3
4
5
6
7
8
data(RLdata500)
X.c <- as.matrix(RLdata500[c("by","bm","bd")])[1:3,]
p.c <- ncol(X.c)
X.s <- as.matrix(RLdata500[c(1,3)])[1:3,]
p.s <- ncol(X.s)
file.num <- rep(c(1,1,1),c(1,1,1))
d <- function(string1,string2){adist(string1,string2)}
lam.gs <- rl.gibbs(file.num,X.s,X.c,num.gs=2,a=.01,b=100,c=1,d, M=3)

resteorts/blink documentation built on Oct. 1, 2020, 6:07 p.m.