Learn R Programming

VGAM (version 0.7-10)

Brat: Inputting Data to fit a Bradley Terry Model

Description

Takes in a square matrix of counts and outputs them in a form that is accessible to the brat and bratt family functions.

Usage

Brat(mat, ties=0*mat, string=c(" > "," == "))

Arguments

Value

  • A matrix with 1 row and either $M(M+1)$ or $M(M-1)$ columns.

Details

In the VGAM package it is necessary for each matrix to be represented as a single row of data by brat and bratt. Hence the non-diagonal elements of the $M+1$ by $M+1$ matrix are concatenated into $M(M+1)$ values (no ties), while if there are ties, the non-diagonal elements of the $M$ by $M$ matrix are concatenated into $M(M-1)$ values.

References

Agresti, A. (2002) Categorical Data Analysis, 2nd ed. New York: Wiley.

See Also

brat, bratt, InverseBrat.

Examples

Run this code
journal = c("Biometrika", "Comm Statist", "JASA", "JRSS-B")
m = matrix(c( NA, 33, 320, 284,   730, NA, 813, 276,
             498, 68,  NA, 325,   221, 17, 142, NA), 4, 4)
dimnames(m) = list(winner = journal, loser = journal)
Brat(m)
vglm(Brat(m) ~ 1, brat, trace=TRUE)

Run the code above in your browser using DataLab