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, ...)

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

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)
#>         items  worth worst_regret regret worthSE regretSE
#>         <chr>  <dbl>        <dbl>  <dbl>   <dbl>    <dbl>
#> 1:      K9107 0.3623       0.0000 0.0000  0.0027   0.0050
#> 2:      CSW18 0.1920       0.0392 0.0187  0.0187   0.0078
#> 3:     PBW343 0.1552       0.0544 0.0295  0.0186   0.0091
#> 4:      DBW17 0.0638       0.0610 0.0563  0.0065   0.0013
#> 5:  DPW621-50 0.0406       0.0681 0.0656  0.0077   0.0023
#> ---                                                      
#> 12:    PBW502 0.0145       0.0713 0.0765  0.0084   0.0028
#> 13:    HI1563 0.0142       0.0714 0.0766  0.0004   0.0028
#> 14:    HD2824 0.0125       0.0710 0.0773  0.0079   0.0024
#> 15:     WR544 0.0113       0.0726 0.0779  0.0069   0.0015
#> 16:     K0307 0.0100       0.0730 0.0785  0.0568   0.0252

# 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)
#>     items  worth worst_regret regret worthSE regretSE
#>     <chr>  <dbl>        <dbl>  <dbl>   <dbl>    <dbl>
#> 1: banana 0.4754       0.0807 0.0128  0.0910   0.0062
#> 2:  apple 0.3866       0.2104 0.0874  0.1099   0.0422
#> 3:   pear 0.0781       0.3478 0.4323  0.0114   0.0218
#> 4: orange 0.0599       0.3611 0.4675  0.0114   0.0227