Collapsed Gibbs sampler for hWRU. Internal function
sample_me(
last_name,
first_name,
mid_name,
geo,
N_rg,
pi_s,
pi_f,
pi_m,
pi_nr,
which_names,
samples,
burnin,
race_init,
verbose
)
Integer vector of last name identifiers for each record (zero indexed; as all that follow). Must match columns numbers in M_rs.
See last_name
See last_name
Integer vector of geographic units for each record. Must match column number in N_rg
Integer matrix of race | geography counts in census (geograpgies in columns).
Numeric matrix of race | surname prior probabilities.
Same as pi_s
, but for first names.
Same as pi_s
, but for middle names.
Matrix of marginal probability distribution over missing names; non-keyword names default to this distribution.
Integer; 0=surname only. 1=surname + first name. 2= surname, first, and middle names.
Integer number of samples to take after (in total)
Integer number of samples to discard as burn-in of Markov chain
Integer vector of initial race assignments
Boolean; should informative messages be printed?