BradleyTerry2 (version 1.1-0)

countsToBinomial: Convert Contingency Table of Wins to Binomial Counts

Description

Convert a contingency table of wins to a four-column data frame containing the number of wins and losses for each pair of players.

Usage

countsToBinomial(xtab)

Arguments

xtab

a contingency table of wins cross-classified by “winner” and “loser”

Value

A data frame with four columns

player1

the first player in the contest.

player2

the second player in the contest.

win1

the number of times player1 won.

win2

the number of times player2 won.

See Also

BTm()

Examples

Run this code
# NOT RUN {
########################################################
##  Statistics journal citation data from Stigler (1994)
##  -- see also Agresti (2002, p448)
########################################################
citations

## Convert frequencies to success/failure data
citations.sf <- countsToBinomial(citations)
names(citations.sf)[1:2] <- c("journal1", "journal2")
citations.sf

# }

Run the code above in your browser using DataCamp Workspace