| baseball {BradleyTerry} | R Documentation |
Baseball results for games in the 1987 season between 7 teams in the Eastern Division of the American League.
data(baseball)
A data frame with 98 observations on the following 4 variables.
winnerMilwaukee Detroit Toronto New York Boston Cleveland BaltimoreloserMilwaukee Detroit Toronto New York Boston Cleveland BaltimoreFreqhome.adv
The home.adv variable is 1 for games where the home team won,
and -1 for games where the away team won.
page 438 of Agresti, A (2002) Categorcal Data Analysis (2nd Edn.). Wiley, New York.
Firth, D. (2005) Bradley-Terry models in R. Journal of Statistical Software, to appear.
data(baseball) ## The data in collapsed tabular form as on p438 of Agresti xtabs(Freq ~ winner + loser, baseball) ## Simple Bradley-Terry model as in Agresti p437 print(baseballModel <- BTm(baseball ~ ..)) ## Introduce order effect as in Agresti p438 update(baseballModel, order.effect = baseball$home.adv)