Learn R Programming

BayesMallows (version 1.1.0)

smc_mallows_new_item_rank_alpha_fixed: SMC-Mallows new item rank (alpha fixed)

Description

Function to perform resample-move SMC algorithm where we receive a new item ranks from an existing user at each time step. Each correction and augmentation is done by filling in the missing item ranks randomly.

Usage

smc_mallows_new_item_rank_alpha_fixed(
  alpha,
  n_items,
  R_obs,
  metric,
  leap_size,
  N,
  Time,
  logz_estimate,
  mcmc_kernel_app,
  alpha_prop_sd,
  lambda,
  alpha_max,
  aug_method,
  verbose = FALSE
)

Arguments

alpha

A numeric value of the true scale parameter

n_items

Integer is the number of items in a ranking

R_obs

3D matrix of size n_assessors by n_items by Time containing a set of observed rankings of Time time steps

metric

A character string specifying the distance metric to use in the Bayesian Mallows Model. Available options are "footrule", "spearman", "cayley", "hamming", "kendall", and "ulam".

leap_size

leap_size Integer specifying the step size of the leap-and-shift proposal distribution

N

Integer specifying the number of particles

Time

Integer specifying the number of time steps in the SMC algorithm

logz_estimate

Estimate of the partition function, computed with estimate_partition_function in the BayesMallow R package estimate_partition_function.

mcmc_kernel_app

Integer value for the number of applications we apply the MCMC move kernel

alpha_prop_sd

Numeric value specifying the standard deviation of the lognormal proposal distribution used for \(\alpha\) in the Metropolis-Hastings algorithm. Defaults to 0.1.

lambda

Strictly positive numeric value specifying the rate parameter of the truncated exponential prior distribution of \(\alpha\). Defaults to 0.1. When n_cluster > 1, each mixture component \(\alpha_{c}\) has the same prior distribution.

alpha_max

Maximum value of alpha in the truncated exponential prior distribution.

aug_method

A character string specifying the approach for filling in the missing data, options are "pseudolikelihood" or "random".

verbose

Logical specifying whether to print out the progress of the SMC-Mallows algorithm. Defaults to FALSE.

Value

a 3d matrix containing the samples of rho and alpha from the SMC algorithm