countsToBinomial: Convert Contingency Table of Wins to Binomial Counts

Description Usage Arguments Value Author(s) See Also Examples

View source: R/countsToBinomial.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
########################################################
##  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

BradleyTerry2 documentation built on May 2, 2019, 5:16 p.m.