countsToBinomial {BradleyTerry2}R Documentation

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.

Author(s)

Heather Turner

See Also

BTm()

Examples


########################################################
##  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


[Package BradleyTerry2 version 1.1-2 Index]