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,
  node.weights = NULL,
  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, ...)

Arguments

object

a data.frame, an object of class pltree, or a list with PlackettLuce models

...

further arguments passed to methods

bootstrap

logical, to run a Bayesian bootstrap on object

normalize

logical, to normalize values to sum to 1

values

an index in object with the values to compute regret

items

an index in object for the different items

group

an index in object for the different scenarios

node.weights

optional named numeric vector with one weight per scenario in group, used for worth, regret and their standard errors. For pltree objects the weights are the share of observations in each terminal node, and for lists of models the share of rankings in each model. Worst regret is not weighted

Value

A data frame with regret estimates

items

the item names

worth

the worth parameters

regret

the squared regret

worst_regret

the worst regret

Details

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

References

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

Author

Jacob van Etten and Kauê de Sousa

Examples


# 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)