# The Hyperdirichlet Distribution, Mark 2

## Documentation for package ‘hyper2’ version 3.2

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D E F G H I J K L M N O P R S T U V W Z misc

hyper2-package | The Hyperdirichlet Distribution, Mark 2

## -- A --

accessor | Wrappers to c calls
accessor3 | Wrappers to c calls
additional_strength | Player with advantage
addL | Wrappers to c calls
addL3 | Wrappers to c calls
allequal | Maximum likelihood estimation
allrowers | Rowing dataset, sculling
args2ordervec | Various functionality for races and hyper3 likelihood functions
as.hyper2 | Basic functions in the hyper2 package
as.hyper3 | Weighted probability vectors: 'hyper3' objects
as.namedvectorlist | Weighted probability vectors: 'hyper3' objects
as.ordertable | Convert an order table with DNS entries to a nice order table
as.ranktable | Convert rank tables to and from order tables
as.suplist | Methods for suplist objects
as.weight | Weighted probability vectors: 'hyper3' objects
assigner | Wrappers to c calls
assigner3 | Wrappers to c calls
assign_lowlevel | Extract or replace parts of a hyper2 object
assign_lowlevel3 | Weighted probability vectors: 'hyper3' objects
attemptstable2supp | Translate attempt tables to hyper3 support functions
attemptstable2supp3 | Translate attempt tables to hyper3 support functions

## -- B --

B | Normalizing constant for the hyperdirichlet distribution
balance | Enforce the zero power sum condition
baseball | Baseball results, following Agresti
baseball_maxp | Baseball results, following Agresti
baseball_table | Baseball results, following Agresti
basketball | Basketball dataset
black_wins | Karpov, Kasparov, Anand
bordered_hessian | Differential calculus
brackets | Basic functions in the hyper2 package
brackets.hyper2 | Basic functions in the hyper2 package

## -- C --

carcinoma | Carcinoma dataset discussed by Agresti
carcinoma_count | Carcinoma dataset discussed by Agresti
carcinoma_maxp | Carcinoma dataset discussed by Agresti
carcinoma_table | Carcinoma dataset discussed by Agresti
Celtic | Dataset from four Scottish football clubs
chameleon | Player with advantage
char2num | Convert a character vector to a numeric vector
char2nv | Various functionality for races and hyper3 likelihood functions
character_to_number | Convert a character vector to a numeric vector
cheering | Various functionality for races and hyper3 likelihood functions
cheering3 | Various functionality for races and hyper3 likelihood functions
chess | Chess playing dataset
chess3 | Karpov, Kasparov, Anand
chess3_maxp | Karpov, Kasparov, Anand
chess_maxp | Chess playing dataset
chess_table | Chess playing dataset
choose_losers | Order statistics
choose_winners | Order statistics
collusion | 1963 World Chess Championships
Connor | Dirichlet distribution and generalizations
consistency | Consistency check for hyper2 objects
consistencyplot | Consistency check for hyper2 objects
constructor | Formula 1 dataset: the constructors' championship
constructors | Formula 1 dataset: the constructors' championship
constructor_2020 | Formula 1 dataset: the constructors' championship
constructor_2020_maxp | Formula 1 dataset: the constructors' championship
constructor_2020_table | Formula 1 dataset: the constructors' championship
constructor_2021 | Formula 1 dataset: the constructors' championship
constructor_2021_maxp | Formula 1 dataset: the constructors' championship
constructor_2021_table | Formula 1 dataset: the constructors' championship
constructor_table_2020 | Formula 1 dataset: the constructors' championship
constructor_table_2021 | Formula 1 dataset: the constructors' championship
counterstrike | Counterstrike
counterstrike_likelihood | Counterstrike
counterstrike_maxp | Counterstrike
cplusplus | Wrappers to c calls
curacao | 1963 World Chess Championships
curacao3 | 1963 World Chess Championships
Curling | Curling at the Winter Olympics, 1998-2018
curling | Curling at the Winter Olympics, 1998-2018
curling1 | Curling at the Winter Olympics, 1998-2018
curling1_maxp | Curling at the Winter Olympics, 1998-2018
curling2 | Curling at the Winter Olympics, 1998-2018
curling2_maxp | Curling at the Winter Olympics, 1998-2018
curling_maxp | Curling at the Winter Olympics, 1998-2018
curling_table | Curling at the Winter Olympics, 1998-2018

## -- D --

dec | Increment and decrement operators
decrement | Increment and decrement operators
den3 | Various functionality for races and hyper3 likelihood functions
dhyper2 | Normalizing constant for the hyperdirichlet distribution
dhyper2_e | Normalizing constant for the hyperdirichlet distribution
differentiate | Wrappers to c calls
differentiate3 | Wrappers to c calls
differentiate_n | Wrappers to c calls
Dirichlet | Dirichlet distribution and generalizations
dirichlet | Dirichlet distribution and generalizations
dirichlet3 | Dirichlet distribution and generalizations
discard | Keep or discard players
discard_flawed | Keep or discard players
discard_flawed2 | Keep or discard players
doubles | Match outcomes from repeated doubles tennis matches
doubles_ghost | Match outcomes from repeated doubles tennis matches
doubles_noghost | Match outcomes from repeated doubles tennis matches
drawn_games | Karpov, Kasparov, Anand
drop | Keep or discard players
drop_flawed | Keep or discard players

## -- E --

elimination | Order statistics
equal | Wrappers to c calls
equality | Wrappers to c calls
equality3 | Wrappers to c calls
equalp | Maximum likelihood estimation
equalp.test | Hypothesis testing
equalprobs | Maximum likelihood estimation
euro | Eurovision Song contest dataset
euro2009 | Eurovision Song contest dataset
Eurodance | Eurovision Dance contest dataset
eurodance | Eurovision Dance contest dataset
eurodance_maxp | Eurovision Dance contest dataset
eurodance_table | Eurovision Dance contest dataset
Eurovision | Eurovision Song contest dataset
eurovision | Eurovision Song contest dataset
Eurovision2009 | Eurovision Song contest dataset
eurovision2009 | Eurovision Song contest dataset
eurovision2009_votingtable | Eurovision Song contest dataset
eurovision_maxp | Eurovision Song contest dataset
Eurovision_song_contest | Eurovision Song contest dataset
eurovision_table | Eurovision Song contest dataset
evaluate | Wrappers to c calls
evaluate3 | Wrappers to c calls
extract | Extract or replace parts of a hyper2 object
Extract.hyper2 | Extract or replace parts of a hyper2 object
extractor | Extract or replace parts of a hyper2 object
extra_strength | Player with advantage
e_to_p | Normalizing constant for the hyperdirichlet distribution

## -- F --

F1 | Formula 1 dataset
F1_2014 | Formula 1 dataset
F1_2015 | Formula 1 dataset
F1_2016 | Formula 1 dataset
F1_2017 | Formula 1 dataset
F1_2018 | Formula 1 dataset
F1_2019 | Formula 1 dataset
F1_points_2017 | Formula 1 dataset
F1_table_2016 | Formula 1 dataset
F1_table_2017 | Formula 1 dataset
F1_table_2018 | Formula 1 dataset
F1_table_2019 | Formula 1 dataset
Falkirk | Dataset from four Scottish football clubs
fillup | Fillup function
formula1 | Formula 1 dataset
formula1_2017_table | Formula 1 dataset
formula1_points_2017 | Formula 1 dataset
formula1_points_systems | Formula 1 dataset
formula1_table_2017 | Formula 1 dataset
formula_1 | Formula 1 dataset
formula_one | Formula 1 dataset

## -- G --

GD | Dirichlet distribution and generalizations
gd | Dirichlet distribution and generalizations
GD_wong | Dirichlet distribution and generalizations
general_grouped_order_likelihood | Order statistics
general_grouped_rank_likelihood | Order statistics
ggol | Order statistics
ggrl | Order statistics
give_warning_on_nonzero_power_sum | Print methods
goodbad | Order statistics
gradient | Differential calculus
gradientn | Differential calculus

## -- H --

handoff | Dataset on communication breakdown in handover between physicians
handover | Dataset on communication breakdown in handover between physicians
handover_maxp | Dataset on communication breakdown in handover between physicians
handover_table | Dataset on communication breakdown in handover between physicians
head.hyper2 | First few terms of a distribution: DEPRECATED
hepatitis | Hepatitis dataset discussed by Agresti
hepatitis_count | Hepatitis dataset discussed by Agresti
hepatitis_maxp | Hepatitis dataset discussed by Agresti
hepatitis_table | Hepatitis dataset discussed by Agresti
hessian | Differential calculus
hessian_bordered | Differential calculus
hessian_lowlevel | Differential calculus
home_away | Pairwise comparisons
home_away3 | Pairwise comparisons
home_away_table | Pairwise comparisons
home_draw_away3 | Pairwise comparisons
humor | Jester dataset
humour | Jester dataset
hyper2 | Basic functions in the hyper2 package
hyper2_accessor | Wrappers to c calls
hyper2_add | Arithmetic Ops Group Methods for hyper2 objects
hyper2_addL | Wrappers to c calls
hyper2_assigner | Wrappers to c calls
hyper2_differentiate | Wrappers to c calls
hyper2_equal | Wrappers to c calls
hyper2_evaluate | Wrappers to c calls
hyper2_identityL | Wrappers to c calls
hyper2_overwrite | Wrappers to c calls
hyper2_prod | Arithmetic Ops Group Methods for hyper2 objects
hyper2_sum_numeric | Arithmetic Ops Group Methods for hyper2 objects
hyper3 | Weighted probability vectors: 'hyper3' objects
hyper3_add | Arithmetic Ops Group Methods for hyper3 objects
hyper3_bw | Weighted probability vectors: 'hyper3' objects
hyper3_equal | Arithmetic Ops Group Methods for hyper3 objects
hyper3_m | Weighted probability vectors: 'hyper3' objects
hyper3_nv | Weighted probability vectors: 'hyper3' objects
hyper3_prod | Arithmetic Ops Group Methods for hyper3 objects
hyper3_sum_numeric | Arithmetic Ops Group Methods for hyper3 objects
hyper3_to_hyper2 | Weighted probability vectors: 'hyper3' objects

## -- I --

icons | Dataset on climate change due to O'Neill
icons_matrix | Dataset on climate change due to O'Neill
icons_maxp | Dataset on climate change due to O'Neill
icons_table | Dataset on climate change due to O'Neill
identityL | Wrappers to c calls
identityL3 | Wrappers to c calls
inc | Increment and decrement operators
increment | Increment and decrement operators
indep | Fillup function
interzonal | 1963 World Chess Championships
interzonal_collusion | 1963 World Chess Championships
interzonal_collusion_maxp | 1963 World Chess Championships
interzonal_maxp | 1963 World Chess Championships
interzonal_table | 1963 World Chess Championships
is.dirichlet | Dirichlet distribution and generalizations
is.hyper2 | Basic functions in the hyper2 package
is.hyper3 | Weighted probability vectors: 'hyper3' objects
is.ranktable | Convert rank tables to and from order tables
is_constant | Basic functions in the hyper2 package
is_ok_hessian | Differential calculus
is_ok_weightedplayers | Weighted probability vectors: 'hyper3' objects
is_valid_hyper2 | Basic functions in the hyper2 package
is_valid_hyper3 | Weighted probability vectors: 'hyper3' objects

## -- J --

Jacobian | Normalizing constant for the hyperdirichlet distribution
javelin | Javelin dataset
javelin1 | Javelin dataset
javelin1_maxp | Javelin dataset
javelin2 | Javelin dataset
javelin2_maxp | Javelin dataset
javelin_maxp | Javelin dataset
javelin_table | Javelin dataset
javelin_vector | Javelin dataset
jester | Jester dataset
jester_maxp | Jester dataset
jester_table | Jester dataset
jokes | Jester dataset

## -- K --

karate | Karate dataset
karate_maxp | Karate dataset
karate_table | Karate dataset
karate_zermelo | Karate dataset
karpov_kasparov_anand | Karpov, Kasparov, Anand
keep | Keep or discard players
keep_flawed | Keep or discard players
keep_flawed2 | Keep or discard players
kka | Karpov, Kasparov, Anand
kka_3draws | Karpov, Kasparov, Anand
kka_3whites | Karpov, Kasparov, Anand
kka_array | Karpov, Kasparov, Anand
knownp.test | Hypothesis testing

## -- L --

length | Length method for hyper2 objects
length.hyper2 | Length method for hyper2 objects
like_series | Log likelihood functions
like_single_list | Log likelihood functions
list2nv | Weighted probability vectors: 'hyper3' objects
Livingston | Dataset from four Scottish football clubs
loglik | Log likelihood functions
loglik_lsl | Methods for suplist objects
loglik_single | Log likelihood functions
loglik_single_redundant | Weighted probability vectors: 'hyper3' objects
lsl | Methods for suplist objects
lsl_add | Methods for suplist objects

## -- M --

malpractice | Dataset on communication breakdown in handover between physicians
MasterChef | Masterchef series 6
masterchef | Masterchef series 6
masterchef_constrained_maxp | Masterchef series 6
masterchef_maxp | Masterchef series 6
matrix2supp | Convert a matrix to a likelihood function
matrix_to_HD | Convert a matrix to a likelihood function
maxjest | Jester dataset
maxp | Maximum likelihood estimation
maxp3 | Weighted probability vectors: 'hyper3' objects
maxplist | Maximum likelihood estimation
maxp_lsl | Maximum likelihood estimation
maxp_simplex | Maximum likelihood estimation
maxp_single | Maximum likelihood estimation
maxp_single2 | Maximum likelihood estimation
mean | Normalizing constant for the hyperdirichlet distribution
mean_hyper2 | Normalizing constant for the hyperdirichlet distribution
mgf | Normalizing constant for the hyperdirichlet distribution
Mosimann | Dirichlet distribution and generalizations
moto | MotoGP dataset
motoGP | MotoGP dataset
motoGP_2019 | MotoGP dataset
moto_maxp | MotoGP dataset
moto_table | MotoGP dataset
mult_grid | Kronecker matrix product functionality

## -- N --

NBA | Basketball dataset
NBA_likelihood | Basketball dataset
NBA_maxp | Basketball dataset
NBA_table | Basketball dataset
nonzero_power_sum | Print methods
num3 | Various functionality for races and hyper3 likelihood functions

## -- O --

oneill | Dataset on climate change due to O'Neill
Ops | Arithmetic Ops Group Methods for hyper2 objects
Ops.hyper2 | Arithmetic Ops Group Methods for hyper2 objects
Ops.hyper3 | Arithmetic Ops Group Methods for hyper3 objects
Ops.lsl | Methods for suplist objects
Ops.suplist | Methods for suplist objects
ordertable | Order tables
ordertable2points | Calculate points from an order table
ordertable2supp | Translate order tables to support functions
ordertable2supp3 | Various functionality for races and hyper3 likelihood functions
ordertable_to_ranktable | Convert rank tables to and from order tables
ordertrans | Order transformation
ordertransplot | Order transformation
ordervec2supp | Translate order tables to support functions
ordervec2supp3 | Various functionality for races and hyper3 likelihood functions
ordervec2supp3a | Various functionality for races and hyper3 likelihood functions
order_obs | Translate order tables to support functions
order_table | Order tables
overwrite | Wrappers to c calls
overwrite3 | Wrappers to c calls
overwrite_lowlevel | Extract or replace parts of a hyper2 object
overwrite_lowlevel3 | Weighted probability vectors: 'hyper3' objects

## -- P --

pairwise | Pairwise comparisons
pair_grid | Kronecker matrix product functionality
pentathlon | Pentathlon
pentathlon_maxp | Pentathlon
pentathlon_ordertable | Pentathlon
pentathlon_table | Pentathlon
ping_pong | Match outcomes from repeated table tennis matches
Plackett | Order statistics
Plackett-Luce | Order statistics
plays_white_draws | Karpov, Kasparov, Anand
plays_white_loses | Karpov, Kasparov, Anand
plays_white_wins | Karpov, Kasparov, Anand
pnames | Basic functions in the hyper2 package
pnames.hyper2 | Basic functions in the hyper2 package
pnames.suplist | Basic functions in the hyper2 package
pnames<- | Basic functions in the hyper2 package
pnames<-.hyper2 | Basic functions in the hyper2 package
pnames<-.hyper3 | Weighted probability vectors: 'hyper3' objects
pnv | Print methods
powerboat | Powerboat dataset
powerboat2018 | Powerboat dataset
powerboat_2018 | Powerboat dataset
powerboat_maxp | Powerboat dataset
powerboat_table | Powerboat dataset
powers | Basic functions in the hyper2 package
powers.hyper2 | Basic functions in the hyper2 package
powers<- | Basic functions in the hyper2 package
powers<-.hyper2 | Basic functions in the hyper2 package
powers<-.hyper3 | Weighted probability vectors: 'hyper3' objects
power_sum | Print methods
Print | Print methods
print | Print methods
print.equalptest | Hypothesis testing
print.hyper2 | Print methods
print.hyper2test | Hypothesis testing
print.hyper3 | Print methods
print.ordertable | Order tables
print.ranktable | Random ranks
print.ranktablesummary | Convert rank tables to and from order tables
print.summary.hyper2 | Summary method for hyper2 objects
probability | Normalizing constant for the hyperdirichlet distribution
profile | Profile likelihood and support
profile_likelihood | Profile likelihood and support
profile_likelihood_single | Profile likelihood and support
profile_support | Profile likelihood and support
profile_support_single | Profile likelihood and support
proflike | Profile likelihood and support
profsup | Profile likelihood and support
profsupp | Profile likelihood and support
psubs | Substitute players of a hyper2 object
psubs_names | Substitute players of a hyper2 object
psubs_pnames | Substitute players of a hyper2 object
psubs_single | Substitute players of a hyper2 object
pwa | Player with advantage
p_to_e | Normalizing constant for the hyperdirichlet distribution

## -- R --

race | Order statistics
race3 | Various functionality for races and hyper3 likelihood functions
race_to_hyper3 | Various functionality for races and hyper3 likelihood functions
Rangers | Dataset from four Scottish football clubs
ranktable | Convert rank tables to and from order tables
ranktable_to_ordertable | Convert rank tables to and from order tables
rankvec_likelihood | Order statistics
rankvec_likelihood3 | Various functionality for races and hyper3 likelihood functions
rank_likelihood | Order statistics
RCLF | Dataset from four Scottish football clubs
RCLF3 | Dataset from four Scottish football clubs
RCLF3_lambda_max | Dataset from four Scottish football clubs
RCLF3_maxp | Dataset from four Scottish football clubs
RCLF3_table | Dataset from four Scottish football clubs
rdirichlet | Dirichlet distribution and generalizations
retain | Keep or discard players
retain_flawed | Keep or discard players
rhyper2 | Random 'hyper2' objects
rhyper3 | Random hyper3 objects
rock_paper_scissors | Chess playing dataset
rorder_single | Random ranks
rowing | Rowing dataset, sculling
rowing_maxp | Rowing dataset, sculling
rowing_minimal | Rowing dataset, sculling
rowing_minimal_maxp | Rowing dataset, sculling
rowing_minimal_table | Rowing dataset, sculling
rowing_table | Rowing dataset, sculling
rp | Random samples from the prior of a 'hyper2' object
rpair3 | Random hyper3 objects
rp_unif | Dirichlet distribution and generalizations
rrace | A random race with given BT strengths
rrace3 | Random hyper3 objects
rracehyper3 | Random hyper3 objects
rrank | Random ranks
rrankk | Random ranks
rrank_single | Random ranks
rwinner3 | Random hyper3 objects

## -- S --

saffy | Convert a matrix to a likelihood function
salad | Translate order tables to support functions
samep.test | Hypothesis testing
sculling | Rowing dataset, sculling
sculls2016 | Rowing dataset, sculling
setweight | Weighted probability vectors: 'hyper3' objects
size | Basic functions in the hyper2 package
size.hyper2 | Basic functions in the hyper2 package
skating | Figure skating at the 2002 Winter Olympics
skating_maxp | Figure skating at the 2002 Winter Olympics
skating_table | Figure skating at the 2002 Winter Olympics
skeleton | Figure skating at the 2002 Winter Olympics
soling | Sailing at the 2000 Summer Olympics - soling
soling2000 | Sailing at the 2000 Summer Olympics - soling
soling2000_qf | Sailing at the 2000 Summer Olympics - soling
soling2000_rr1 | Sailing at the 2000 Summer Olympics - soling
soling2000_rr2 | Sailing at the 2000 Summer Olympics - soling
soling_after | Sailing at the 2000 Summer Olympics - soling
soling_after_maxp | Sailing at the 2000 Summer Olympics - soling
soling_maxp | Sailing at the 2000 Summer Olympics - soling
soling_qf | Sailing at the 2000 Summer Olympics - soling
soling_rr1 | Sailing at the 2000 Summer Olympics - soling
soling_rr2 | Sailing at the 2000 Summer Olympics - soling
soling_table | Sailing at the 2000 Summer Olympics - soling
soling_table_2000 | Sailing at the 2000 Summer Olympics - soling
specificp.ge.test | Hypothesis testing
specificp.gt.test | Hypothesis testing
specificp.le.test | Hypothesis testing
specificp.lt.test | Hypothesis testing
specificp.ne.test | Hypothesis testing
specificp.test | Hypothesis testing
stockholm1962 | 1963 World Chess Championships
sum.hyper2 | Arithmetic Ops Group Methods for hyper2 objects
sum.hyper3 | Arithmetic Ops Group Methods for hyper3 objects
sum.suplist | Methods for suplist objects
summary.hyper2 | Summary method for hyper2 objects
summary.ranktable | Convert rank tables to and from order tables
suplist | Methods for suplist objects
suplist_add | Methods for suplist objects
suplist_times_scalar | Methods for suplist objects
suppfun | Convert various datasets to support functions.
suppfun.character | Convert various datasets to support functions.
suppfun.numeric | Convert various datasets to support functions.
suppfun.ordertable | Convert various datasets to support functions.
suppfun.ranktable | Convert various datasets to support functions.
supplist | Methods for suplist objects
surfing | Surfing dataset
surfing_maxp | Surfing dataset
surfing_table | Surfing dataset
surfing_venuetypes | Surfing dataset
sushi | Sushi dataset
sushi_eq_classes | Sushi dataset
sushi_maxp | Sushi dataset
sushi_table | Sushi dataset

## -- T --

T20 | Indian Premier League T20 cricket
T20_maxp | Indian Premier League T20 cricket
T20_table | Indian Premier League T20 cricket
T20_toss | Indian Premier League T20 cricket
T20_toss_maxp | Indian Premier League T20 cricket
table_tennis | Match outcomes from repeated table tennis matches
table_tennis_serve | Match outcomes from repeated table tennis matches
tennis | Match outcomes from repeated doubles tennis matches
tennis_ghost | Match outcomes from repeated doubles tennis matches
tennis_ghost_maxp | Match outcomes from repeated doubles tennis matches
tennis_maxp | Match outcomes from repeated doubles tennis matches
tennis_noghost | Match outcomes from repeated doubles tennis matches
tidy | Tidy up a hyper2 object
training_strength | Player with advantage
trial | Increment and decrement operators

## -- U --

universities | New Zealand University ranking data
universities_maxp | New Zealand University ranking data
universities_table | New Zealand University ranking data

## -- V --

vb | Results from the NOCS volleyball league
vb_synthetic | Results from the NOCS volleyball league
volley | Convert a matrix to a likelihood function
volleyball | Results from the NOCS volleyball league
volleyball_matrix | Results from the NOCS volleyball league
volleyball_maxp | Results from the NOCS volleyball league
volleyball_results | Results from the NOCS volleyball league
volleyball_table | Results from the NOCS volleyball league
volvo | Race results from the 2014-2015 Volvo Ocean Race
volvo2014 | Race results from the 2014-2015 Volvo Ocean Race
volvo_maxp | Race results from the 2014-2015 Volvo Ocean Race
volvo_ocean_race | Race results from the 2014-2015 Volvo Ocean Race
volvo_table | Race results from the 2014-2015 Volvo Ocean Race
volvo_table_2014 | Race results from the 2014-2015 Volvo Ocean Race

## -- W --

weights | Weighted probability vectors: 'hyper3' objects
weights.hyper3 | Weighted probability vectors: 'hyper3' objects
wet_strength | Player with advantage
white_draw | Pairwise comparisons
white_draw3 | Pairwise comparisons
white_strength | Player with advantage
white_wins | Karpov, Kasparov, Anand
wikitable_to_ranktable | Convert rank tables to and from order tables

## -- Z --

zacslist | Counterstrike
zapweak | Zap weak competitors
zermelo | Pairwise comparisons
zipf | Zipf's law

## -- misc --

[.hyper2 | Extract or replace parts of a hyper2 object
[.ordertable | Order tables
[<-.hyper2 | Extract or replace parts of a hyper2 object