sample_nu.Rd
This function implements a Gibbs sampler via data augmentation for updating the unique worth parameters, nu, in Bayesian Rank-Clustered BTL models. For internal use only.
sample_nu(
n = 1,
Pi,
I,
J,
nu,
p,
K,
a_gamma,
b_gamma,
c_k0 = NULL,
delta_irk0 = NULL,
groupwise = FALSE
)
A numeric indicating the number of posterior samples to draw.
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 vector of constants, as calculated by the obtain_constants function.
A matrix of constants, as calculated by the obtain_constants function.
A boolean to indicate whether the observed rankings are complete/partial rankings (FALSE
; default) or groupwise comparisons (TRUE
).
A matrix containing updated values for nu for n posterior samples.