smc_mallows_new_item_rank: SMC-Mallows new item rank

View source: R/RcppExports.R

smc_mallows_new_item_rankR Documentation

SMC-Mallows new item rank

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 using pseudolikelihood augmentation.

Usage

smc_mallows_new_item_rank(
  n_items,
  R_obs,
  N,
  Time,
  logz_estimate,
  cardinalities,
  mcmc_kernel_app,
  aug_rankings_init = NULL,
  rho_samples_init = NULL,
  alpha_samples_init = 0L,
  alpha = 0,
  alpha_prop_sd = 0.5,
  lambda = 0.1,
  alpha_max = 1e+06,
  aug_method = "random",
  verbose = FALSE,
  alpha_fixed = FALSE,
  metric = "footrule",
  leap_size = 1L
)

Arguments

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

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.

cardinalities

Cardinalities for exact computation of partition function, returned from prepare_partition_function.

mcmc_kernel_app

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

aug_rankings_init

Initial values for augmented rankings.

rho_samples_init

Initial values for rho samples.

alpha_samples_init

Initial values for alpha samples.

alpha

numeric value of the scale parameter.

alpha_prop_sd

Numeric value of the standard deviation of the prior distribution for alpha

lambda

Strictly positive numeric value specifying the rate parameter of the truncated exponential prior distribution of alpha.

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.

alpha_fixed

Logical indicating whether to sample alpha or not.

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

Value

a 3d matrix containing: the samples of: rho, alpha and the augmented rankings, and the effective sample size at each iteration of the SMC algorithm.

See Also

Other modeling: compute_mallows_mixtures(), compute_mallows(), smc_mallows_new_users()


BayesMallows documentation built on Nov. 25, 2023, 5:09 p.m.