To cite the hyper2 package in publications, please use Hankin (2017). The modern pentathlon is an Olympic sport that comprises five different events: fencing, swimming, horse riding, and running. This short document discusses a dataset taken from the 2004 Summer Olympics, analysing the order statistic for the top seven competitors:

(I have removed diacritics from some of the names).

pentathlon_table <- ordertable(as.matrix(read.table("pentathlon.txt")))
pentathlon_table
## An ordertable:
##               shooting fencing swimming riding running
## Moiseev              5       1        1      6       5
## Zadneprovskis        6       2        5      5       1
## Capalini             4       6        2      3       4
## Cerkovskis           3       3        7      7       2
## Meliakh              1       7        4      1       6
## Michalik             2       4        6      2       7
## Walther              7       5        3      4       3

Thus the top line shows that Moiseev came fifth in shooting, first in fencing and swimming, sixth in riding, and fifth in running. The first column shows that the shooting was won by Meliakh (who came first), runner up was Machalik, and so on.

We can present the same information in another way:

ordertable_to_ranktable(pentathlon_table)
## A ranktable:
##          c1            c2            c3         c4       c5            c6            c7        
## shooting Meliakh       Michalik      Cerkovskis Capalini Moiseev       Zadneprovskis Walther   
## fencing  Moiseev       Zadneprovskis Cerkovskis Michalik Walther       Capalini      Meliakh   
## swimming Moiseev       Capalini      Walther    Meliakh  Zadneprovskis Michalik      Cerkovskis
## riding   Meliakh       Michalik      Capalini   Walther  Zadneprovskis Moiseev       Cerkovskis
## running  Zadneprovskis Cerkovskis    Walther    Capalini Moiseev       Meliakh       Michalik
pentathlon <- suppfun(pentathlon_table)
pentathlon_maxp <- maxp(pentathlon)
pentathlon_maxp
##      Capalini    Cerkovskis       Meliakh      Michalik       Moiseev       Walther Zadneprovskis 
##      0.186955      0.087915      0.132319      0.114944      0.179307      0.129999      0.168560
pie(pentathlon_maxp)

And we can test the null that the competitors all have the same Plackett-Luce strengths:

equalp.test(pentathlon)
## 
##  Constrained support maximization
## 
## data:  pentathlon
## null hypothesis: Capalini = Cerkovskis = Meliakh = Michalik = Moiseev = Walther = Zadneprovskis
## null estimate:
##      Capalini    Cerkovskis       Meliakh      Michalik       Moiseev       Walther Zadneprovskis 
##       0.14286       0.14286       0.14286       0.14286       0.14286       0.14286       0.14286 
## (argmax, constrained optimization)
## Support for null:  -42.626 + K
## 
## alternative hypothesis:  sum p_i=1 
## alternative estimate:
##      Capalini    Cerkovskis       Meliakh      Michalik       Moiseev       Walther Zadneprovskis 
##      0.186955      0.087915      0.132319      0.114944      0.179307      0.129999      0.168560 
## (argmax, free optimization)
## Support for alternative:  -41.868 + K
## 
## degrees of freedom: 6
## support difference = 0.75767
## p-value: 0.95847

Package dataset

Following lines create pentathlon.rda, residing in the data/ directory of the package.

save(pentathlon_table,pentathlon,pentathlon_maxp,file="pentathlon.rda")

References

Hankin, R. K. S. 2017. “Partial Rank Data with the hyper2 Package: Likelihood Functions for Generalized Bradley-Terry Models.” The R Journal 9 (2): 429–39.