Computes a preference index for each item in a ranking using Plackett–Luce worth parameters. For each item, the function estimates the probability of being ranked at the top or bottom of the sets in which it appears, and calculates a net winning probability as the difference between top and bottom probabilities.
preference_index(object)A rankings object (from PlackettLuce) or
a matrix that can be coerced to rankings with
as.rankings.
A gosset_df (data.frame subclass) with columns:
Item identifier (name).
Number of appearances of the item across sets.
Expected top probability (%).
Expected bottom probability (%).
Net winning probability (%).
Normalized worth parameter.
The preference index provides a model-based summary of performance across all ranking sets. Probabilities are derived from the fitted Plackett–Luce worth parameters, normalized to sum to one.
For each item:
top_probs is the expected probability (in percent)
of being ranked first in its sets.
bottom_probs is the expected probability (in percent)
of being ranked last in its sets.
net_winning_probs is the difference
top_probs - bottom_probs, a relative preference score.
worth is the normalized worth parameter from the
Plackett–Luce model.
The output is ordered by descending net winning probability, providing a leaderboard-style summary of items.
library(PlackettLuce)
R = matrix(c(1, 2, 0, 0,
4, 1, 2, 3,
2, 1, 3, 0,
1, 2, 3, 0,
2, 1, 3, 0,
1, 0, 3, 2),
nrow = 6, byrow = TRUE)
colnames(R) = c("apple", "banana", "orange", "pear")
R = as.rankings(R)
preference_index(R)
#> item n top bottom net_winning worth
#> <fct> <int> <dbl> <dbl> <dbl> <dbl>
#> 1: banana 10 56.5131 8.5015 48.0116 0.4856
#> 2: apple 12 35.2604 17.6625 17.5979 0.2725
#> 3: pear 5 24.8331 20.0450 4.7881 0.1803
#> 4: orange 11 7.9617 72.9827 -65.0211 0.0616