expected_dist: Expected value of metrics under a Mallows rank model

View source: R/expected_dist.R

expected_distR Documentation

Expected value of metrics under a Mallows rank model

Description

Compute the expectation of several metrics under the Mallows rank model.

Usage

expected_dist(alpha, n_items, metric)

Arguments

alpha

Non-negative scalar specifying the scale (precision) parameter in the Mallows rank model.

n_items

Integer specifying the number of items.

metric

Character string specifying the distance measure to use. Available options are "kendall", "cayley", "hamming", "ulam" for n_items<=95, "footrule" for n_items<=50 and "spearman" for n_items<=14.

Value

A scalar providing the expected value of the metric under the Mallows rank model with distance specified by the metric argument.

See Also

Other rank functions: get_mallows_loglik(), rank_conversion, rank_distance(), rank_freq_distr(), sample_mallows()

Examples

expected_dist(1, 5, metric = "kendall")
expected_dist(2, 6, metric = "cayley")
expected_dist(1.5, 7, metric = "hamming")
expected_dist(5, 30, "ulam")
expected_dist(3.5, 45, "footrule")
expected_dist(4, 10, "spearman")

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