Learn R Programming

BayesMallows (version 1.3.2)

leap_and_shift_probs: Leap and Shift Probabilities

Description

Calculates transition probabilities for proposing a new rho

Usage

leap_and_shift_probs(rho, n_items, leap_size = 1L)

Value

A list containing:

  • rho_prime A ranking sequence proposed consensus ranking

  • forwards_prob Numeric value to account for transition probability from rho to rho_prime

  • backwards_prob Numeric Value to account for the transition probability from rho_prime to rho

Arguments

rho

A ranking sequence

n_items

Integer is the number of items in a ranking

leap_size

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

Examples

Run this code
rho <- c(1, 2, 3, 4, 5, 6)
n_items <- 6

leap_and_shift_probs(rho, n_items, 1)
leap_and_shift_probs(rho, n_items, 2)
leap_and_shift_probs(rho, n_items, 3)

Run the code above in your browser using DataLab