Description Usage Arguments Value Examples
View source: R/ebGibbsSampler.R
Gibbs sampler for empirically motivated Bayesian record linkage
1 2 3 4 5 6 7 8 9 10 11 |
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 |
lambda.out The estimated linkage structure via Gibbs sampling
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)
|
Loading required package: stringdist
Loading required package: RecordLinkage
Loading required package: DBI
Loading required package: RSQLite
Loading required package: ff
Loading required package: bit
Attaching package bit
package:bit (c) 2008-2012 Jens Oehlschlaegel (GPL-2)
creators: bit bitwhich
coercion: as.logical as.integer as.bit as.bitwhich which
operator: ! & | xor != ==
querying: print length any all min max range sum summary
bit access: length<- [ [<- [[ [[<-
for more help type ?bit
Attaching package: 'bit'
The following object is masked from 'package:base':
xor
Attaching package ff
- getOption("fftempdir")=="/work/tmp/tmp/RtmpkMNMZW"
- getOption("ffextension")=="ff"
- getOption("ffdrop")==TRUE
- getOption("fffinonexit")==TRUE
- getOption("ffpagesize")==65536
- getOption("ffcaching")=="mmnoflush" -- consider "ffeachflush" if your system stalls on large writes
- getOption("ffbatchbytes")==16777216 -- consider a different value for tuning your system
- getOption("ffmaxbytes")==536870912 -- consider a different value for tuning your system
Attaching package: 'ff'
The following objects are masked from 'package:bit':
clone, clone.default, clone.list
The following objects are masked from 'package:utils':
write.csv, write.csv2
The following objects are masked from 'package:base':
is.factor, is.ordered
Loading required package: ffbase
Attaching package: 'ffbase'
The following objects are masked from 'package:ff':
[.ff, [.ffdf, [<-.ff, [<-.ffdf
The following objects are masked from 'package:base':
%in%, table
RecordLinkage library
[c] IMBEI Mainz
Attaching package: 'RecordLinkage'
The following object is masked from 'package:ff':
clone
The following object is masked from 'package:bit':
clone
Loading required package: plyr
[1] "Gibbs sampler iteration 1"
[1] " Drawing beta"
[1] " Drawing z"
[1] " Drawing Y.s"
[1] " Drawing Y.c"
[1] " Drawing lambda"
[1] " Updating lambda history"
[1] "Gibbs sampler iteration 2"
[1] " Drawing beta"
[1] " Drawing z"
[1] " Drawing Y.s"
[1] " Drawing Y.c"
[1] " Drawing lambda"
[1] " Updating lambda history"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.