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)