consistency: Consistency check for hyper2 objects

consistencyR Documentation

Consistency check for hyper2 objects

Description

Given a hyper2 object, calculate the maximum likelihood point in two ways and plot one against the other to check for consistency.

Usage

consistency(H, plot=TRUE, ...)

Arguments

H

A hyper2 object

plot

If TRUE (default), plot a comparison and return a matrix invisibly, and if FALSE return the matrix. Modelled on argument plot of hist

...

Further arguments, passed to points()

Details

Given a hyper2 object, calculate the maximum likelihood estimate of the players' strengths using maxp(); then reverse the pnames attribute and calculate the players' strengths again. These two estimates should be identical but small differences highlight numerical problems. Typically, the differences are small if there are fewer than about 25 players.

Reversing the pnames() is cosmetic in theory but is a non-trivial operation: for example, it changes the identity of the fillup from the last player to the first.

Value

Returns a named three-row matrix with first row being the direct evaluate, second row being the reverse of the reversed evaluate, and the third being the difference

Author(s)

Robin K. S. Hankin

See Also

ordertrans

Examples


# consistency(icons)

x <- icons
y <- icons
pnames(y) <- rev(pnames(y))
gradient(x,indep(equalp(x)))
gradient(y,indep(equalp(y)))


hyper2 documentation built on Aug. 21, 2022, 1:05 a.m.