SMCMCupdate {bstrl}R Documentation

Perform an SMCMC update of record linkage with a new file

Description

Perform an SMCMC update of record linkage with a new file

Usage

SMCMCupdate(
  state,
  newfile,
  flds = NULL,
  nIter.jumping = 5,
  nIter.transition = 10,
  cores = 1,
  proposals.jumping = c("component", "LB"),
  proposals.transition = c("LB", "component"),
  blocksize = NULL,
  seed = 0
)

Arguments

state

Existing record linkage state. Returned by either bipartiteRL, PPRBupdate, SMCMCupdate, or multifileRL. This is used as the ensemble of samples in SMCMC update

newfile

A data.frame representing the new file: one row per record

flds

Names of fields in the new file to use for comparison. Only used if no global field names were specified in bipartiteRL initially.

nIter.jumping, nIter.transition

Number of iterations to use in the jumping kernel and transition kernel, respectively, for each ensemble sample.

cores

Number of cores to use for parallel execution. If cores == 1, update is run sequentially. A cluster is created using parallel::makeCluster().

proposals.jumping, proposals.transition

Which kernel to use for Z updates in the jumping and transition kernels, respectively.

blocksize

Size of blocks to use for locally balanced proposals. Default performs unblocked locally balanced proposals.

seed

Random seed to set at the beginning of the MCMC run. This is ignored if cores > 1.

Value

An object of class 'bstrlstate' containing posterior samples and necessary metadata for passing to future streaming updates.

Examples

data(geco_small)
data(geco_small_result)

# Add fifth file to previous four-file link result
filtered <- thinsamples(geco_small_result, 2) # Filter ensemble to 2 - very small for example
file5.result <- SMCMCupdate(filtered, geco_small[[5]],
                            nIter.jumping=1, nIter.transition=1, # Very small run for example
                            proposals.jumping="LB", proposals.transition="LB",
                            blocksize=5)


[Package bstrl version 1.0.2 Index]