Regret is an important heuristic in the behavioural sciences. Minimizing worst regret (the loss under the worst possible outcome) is a criterion that takes a conservative approach to risk analysis in diversification strategies.
regret(object, ..., bootstrap = TRUE, normalize = TRUE)
# Default S3 method
regret(object, ..., values, items, group, bootstrap = TRUE, normalize = TRUE)
# S3 method for class 'pltree'
regret(object, bootstrap = TRUE, normalize = TRUE, ...)
# S3 method for class 'list'
regret(object, bootstrap = TRUE, normalize = TRUE, ...)
a data.frame, an object of class pltree
, or a
list with PlackettLuce
models
further arguments passed to methods
logical, to run a Bayesian bootstrap on object
logical, to normalize values to sum to 1
an index in object with the values to compute regret
an index in object for the different items
an index in object for the different scenarios
A data frame with regret estimates
the item names
the worth parameters
the squared regret
the worst regret
Additional details for Bayesian bootstrap:
statistic
A function that accepts data as its first argument and possibly,
the weights as its second, if use_weights is TRUE; n1
The size of
the bootstrap sample; n2
The sample size used to calculate
the statistic each bootstrap draw
Loomes G. & Sugden R. (1982). The Economic Journal, 92(368), 805. doi:10.2307/2232669
Bleichrodt H. & Wakker P. P. (2015). The Economic Journal, 125(583), 493–532. doi:10.1111/ecoj.12200
# Case 1 ####
library("PlackettLuce")
data("breadwheat", package = "gosset")
# convert the tricot rankings from breadwheat data
# into a object of class 'grouped_rankings'
G = rank_tricot(breadwheat,
items = c("variety_a","variety_b","variety_c"),
input = c("overall_best","overall_worst"),
group = TRUE)
# combine grouped rankings with temperature indices
mydata = cbind(G, breadwheat[c("lon","lat")])
# fit a pltree model using geographic data
mod = pltree(G ~ ., data = mydata)
regret(mod)
# Case 2 ####
# list of PlackettLuce models
R = matrix(c(1, 2, 3, 0,
4, 1, 2, 3,
2, 1, 3, 4,
1, 2, 3, 0,
2, 1, 3, 0,
1, 0, 3, 2), nrow = 6, byrow = TRUE)
colnames(R) = c("apple", "banana", "orange", "pear")
mod1 = PlackettLuce(R)
R2 = matrix(c(1, 2, 0, 3,
2, 1, 0, 3,
2, 1, 0, 3,
1, 2, 0, 3,
2, 1, 0, 3,
1, 3, 4, 2), nrow = 6, byrow = TRUE)
colnames(R2) = c("apple", "banana", "orange", "pear")
mod2 = PlackettLuce(R2)
mod = list(mod1, mod2)
regret(mod, n1 = 500)