Worker function for computing the posterior distribution.
run_mcmc(rankings, nmc, constraints, cardinalities, logz_estimate,
rho_init, metric = "footrule", error_model = "none",
n_clusters = 1L, include_wcd = FALSE, leap_size = 1L,
alpha_prop_sd = 0.5, alpha_init = 5, alpha_jump = 1L,
lambda = 0.1, psi = 10L, rho_thinning = 1L, aug_thinning = 1L,
clus_thin = 1L, save_aug = FALSE, verbose = FALSE, kappa_1 = 1,
kappa_2 = 1)
A set of complete rankings, with one sample per column. With n_assessors samples and n_items items, rankings is n_items x n_assessors.
Number of Monte Carlo samples.
List of lists of lists, returned from `generate_constraints`.
Used when metric equals "footrule"
or
"spearman"
for computing the partition function. Defaults to
R_NilValue
.
Estimate of the log partition function.
The distance metric to use. One of "spearman"
,
"footrule"
, "kendall"
, "cayley"
, or
"hamming"
.
Number of clusters. Defaults to 1.
Boolean defining whether or not to store the within-cluster distance.
Leap-and-shift step size.
Standard deviation of proposal distribution for alpha.
Initial value of alpha.
How many times should we sample rho
between
each time we sample alpha
. Setting alpha_jump
to a high
number can significantly speed up computation time, since we then do not
have to do expensive computation of the partition function.
Parameter of the prior distribution.
Hyperparameter for the Dirichlet prior distribution used in clustering.
Thinning parameter. Keep only every rho_thinning
rank
sample from the posterior distribution.
Integer specifying the thinning for data augmentation.
Integer specifying the thinning for saving cluster assignments.
Whether or not to save the augmented data every
aug_thinning
th iteration.
Logical specifying whether to print out the progress of the
Metropolis-Hastings algorithm. If TRUE
, a notification is printed every
1000th iteration.
Hyperparameter for \(theta\) in the Bernoulli error model. Defaults to 1.0.
Hyperparameter for \(theta\) in the Bernoulli error model. Defaults to 1.0.