Learn R Programming

BayesMallows (version 1.1.0)

leap_and_shift_probs: Leap and Shift Probabilities

Description

Determine the new Calculates transition probabilities for proposing a new rho

Usage

leap_and_shift_probs(rho, leap_size, n_items)

Arguments

rho

A ranking sequence

leap_size

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

n_items

Integer is the number of items in a ranking

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

Examples

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

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

Run the code above in your browser using DataLab