sample_partition.Rd
This function implements a reversible jump MCMC procedure for updating the parameter partition in Bayesian Rank-Clustered BTL models. For internal use only.
sample_partition(
Pi,
I,
J,
nu,
g,
K,
a_gamma,
b_gamma,
logprior_partition,
b_g = 0.5,
d_g = 0.5,
groupwise = FALSE
)
A matrix of preference orderings ("rankings"), such that the (i,j) entry is the index of the jth-most preferred object according to judge i. If groupwise=TRUE
, then the index corresponds to the jth-most preferred object among those in row i; if groupwise=FALSE
, it is assumed that all unranked objects (if any) are less preferred than those which are ranked.
A numeric indicating the number of rows in Pi
A numeric indicating the total number of objects being compared.
A vector indicating current values for nu in the Gibbs sampler.
A vector indicating current values for g in the Gibbs sampler.
A vector indicating current values for K in the Gibbs sampler.
A numeric for the first hyperparameter (shape) in a Gamma prior on each worth parameter.
A numeric for the second hyperparameter (rate) in a Gamma prior on each worth parameter.
A J-vector indicating the log unnormalized probability for each possible partition, based on its number of non-empty clusters.
The probability of "birth"ing a new partition cluster, if possible.
The probability of "death"ing an existing partition cluster, if possible.
A boolean to indicate whether the observed rankings are complete/partial rankings (FALSE
; default) or groupwise comparisons (TRUE
).
A list containing updated values for g, nu, and K.