SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
BradleyTerry2: Flexible Models for Paired
                         Comparisons

                                Heather Turner and David Firth

                                        Department of Statistics
                                       University of Warwick, UK


                                             21 July 2010



H. Turner and D. Firth (Warwick, UK)           BradleyTerry2       useR! 2010   1 / 15
Pair Comparisons


 In situations where one object is pitted against another, e.g.

         players/teams in sport
         consumer products in market research
         images in psychology experiments
         plants in pest-resistance trials
         alleles in transmission from parent to child




H. Turner and D. Firth (Warwick, UK)        BradleyTerry2    useR! 2010   2 / 15
Bradley-Terry Models

 In a contest between two players i and j, the basic Bradley-Terry
 Model is given by

                                        pr(i beats j)   αi /(αi + αj )   αi
             odds(i beats j) =                        =                =
                                        pr(j beats i)   αj /(αi + αj )   αj

 where αi , αj > 0 are the player abilities.

 The abilities can be estimated via maximum likelihood by re-framing
 the model as a logistic model:

                                  logit(pr(i beats j)) = λi − λj


H. Turner and D. Firth (Warwick, UK)         BradleyTerry2             useR! 2010   3 / 15
Structured Bradley-Terry Models
 Contest-specific effects

                                       λik = αi +              βr xikr
                                                        r

 Ability modelled by player attributes

                                        λi =        βr xir + ei
                                                r

 The prediction error ei

         allows for variability between players with equal covariate values
         induces correlation between comparisons with a common player

H. Turner and D. Firth (Warwick, UK)           BradleyTerry2             useR! 2010   4 / 15
The BradleyTerry2 package
 New features to accommodate general Bradley-Terry model

         flexible formula interface to modelling fitting function BTm():
         allows player-specific, judge-specific, contest-specific variables
         and random effects
         PQL algorithm for estimation of GLMMs
         efficient data management of multiple data frames

 Best of original BradleyTerry package

         translation of ability formula to design matrix
         methods for fitted model object, e.g. anova, BTabilities
         handling of missing data in player covariates
H. Turner and D. Firth (Warwick, UK)   BradleyTerry2           useR! 2010   5 / 15
College Ice Hockey: Men’s Division I
                                       1083 games from the 2009-10
                                       composite schedule

                                       58 teams from 6 conferences

                                       Results in data frame icehockey
                                           visitor visiting team
                                           opponent usually home
                                           team
                                           result 1, 0 or 0.5




H. Turner and D. Firth (Warwick, UK)   BradleyTerry2            useR! 2010   6 / 15
KRACH Ratings

 Ken’s Ratings for American College Hockey are obtained from a
 standard Bradley-Terry model with a separate ability for each team:
 > standardBT <- BTm(outcome = result,
 +      player1 = data.frame(team = visitor),
 +      player2 = data.frame(team = opponent),
 +      id = "team", formula = ~ team, data = icehockey)
 The default behaviour provides some simplification
 > standardBT <- BTm(outcome = result,
 +      player1 = visitor, player2 = opponent,
 +      id = "team", data = icehockey)




H. Turner and D. Firth (Warwick, UK)       BradleyTerry2   useR! 2010   7 / 15
Converting BTm Results to KRACH
 The BTabilities function returns the log-abilities and s.e.
 > head(BTabilities(standardBT), 4)
                       ability      s.e.
 Alaska-Anchorage    0.0000000 0.0000000
 Air Force          -1.4135091 0.6560509
 Alabama-Huntsville -0.6825408 0.6052347
 American Int’l     -2.9316119 0.7121359
 KRACH rescales the abilities so that KRACH = 100 ⇒ RRWP = 0.5
 > KRACH <- exp(BTabilities(standardBT)[,1])*scale
 > head(sort(round(KRACH, 1), decr = TRUE))
            Denver                      Miami       Wisconsin
             543.0                      488.2           481.3
      North Dakota             Boston College St. Cloud State
             434.3                      346.2           345.3

H. Turner and D. Firth (Warwick, UK)      BradleyTerry2         useR! 2010   8 / 15
Home Ice Advantage
 The official NCAA ranking gives more credit for neutral-site/road
 wins. Equivalently we can adjust for home ice advantage
 > levelBT <- BTm(result,
 +    data.frame(team = visitor, home.ice = 0),
 +    data.frame(team = opponent, home.ice = home.ice),
 +    ~ team + home.ice, id = "team", data = icehockey)
                      10 15 20 25 30 35
          No. Teams
                      5
                      0




                                          −4   −3    −2   −1    0         1          2   3   4   5   6
                                                                    Change in Rank


H. Turner and D. Firth (Warwick, UK)                           BradleyTerry2                         useR! 2010   9 / 15
Effect on Selection?
 The 6 regional winners automatically qualify for the NCAA
 tournament, whilst another 10 are selected by ranking

                   KRACH                    level KRACH            NCAA
                 Denver                         Denver              Miami
                 Miami                          Miami               Denver
               Wisconsin                      Wisconsin           Wisconsin
            St. Cloud State                St. Cloud State     St. Cloud State
           Minnesota Duluth                 Bemidji State       Bemidji State
           Northern Michigan              Northern Michigan          Yale
            Colorado College               New Hampshire      Northern Michigan
            New Hampshire                 Minnesota Duluth     New Hampshire
               Minnesota                   Colorado College         Alaska
             Bemidji State                     Vermont             Vermont

H. Turner and D. Firth (Warwick, UK)          BradleyTerry2              useR! 2010   10 / 15
Lizards Data Revisited




H. Turner and D. Firth (Warwick, UK)     BradleyTerry2    useR! 2010   11 / 15
Data Structure in R

 > str(flatlizards)
 List of 2
  $ contests :’data.frame’: 100 obs. of 2 variables:
   ..$ winner: Factor w/ 77 levels "lizard003","lizard005",..: 27 33
   ..$ loser : Factor w/ 77 levels "lizard003","lizard005",..: 3 6 7
  $ predictors:’data.frame’: 77 obs. of 18 variables:
   ..$ id           : Factor w/ 77 levels "3","5","6","9",..: 1 2 3 4
   ..$ throat.PC1 : num [1:77] -1.16 -13.19 -12.47 4.75 -13.47 ...
   ..$ throat.PC2 : num [1:77] 1.066 2.127 -0.771 8.399 -1.968 ...
   ..$ throat.PC3 : num [1:77] 3.2152 0.8776 -1.6139 0.0786 0.4982 .
   ...




H. Turner and D. Firth (Warwick, UK)         BradleyTerry2   useR! 2010   12 / 15
Model in Whiting et al, Animal Behaviour, 2006
 > liz <- BTm(1, winner, loser, ~throat.PC1[..] + throat.PC3[..] +
      head.length[..] + SVL[..] + (1|..), data = flatlizards)

                                   No random effects            Random effects
                                 Estimate Std. Error Estimate Std. Error
          lizard096                    16.42                   36.68
          lizard099                     0.84            1.16    0.95        1.28
          throat.PC1                   −0.09            0.03   −0.09        0.04
          throat.PC3                    0.34            0.11    0.37        0.15
          head.length                  −1.13            0.49   −1.38        0.74
          SVL                           0.19            0.10    0.17        0.14
          σe                                                    1.1         0.3

H. Turner and D. Firth (Warwick, UK)           BradleyTerry2            useR! 2010   13 / 15
Main conclusions from original study:

         Overall brightness (PC1) and UV intensity (PC3) of the throat
         are clearly significant predictors of fight-winning ability.
         PC3 has by far the largest effect: in a contest between lizards at
         ±2 standard deviations the odds are estimated as ≈ 30 in favour
         of the lizard with greater UV reflectance on the throat.




 Thankfully unaffected by allowing for variation between lizards with
 the same covariate values!



H. Turner and D. Firth (Warwick, UK)   BradleyTerry2          useR! 2010   14 / 15
Summary


 BradleyTerry2 can be downloaded from
 http://cran.r-project.org/package=BradleyTerry2

 Package vignette gives further examples.

 Further development planned, e.g.

         better handling of ties
         random effects for judges




H. Turner and D. Firth (Warwick, UK)    BradleyTerry2   useR! 2010   15 / 15

Más contenido relacionado

La actualidad más candente

[Paper] eXplainable ai(xai) in computer vision
[Paper] eXplainable ai(xai) in computer vision[Paper] eXplainable ai(xai) in computer vision
[Paper] eXplainable ai(xai) in computer visionSusang Kim
 
Find nuclei in images with U-net
Find nuclei in images with U-netFind nuclei in images with U-net
Find nuclei in images with U-netDing Li
 
Avihu Efrat's Viola and Jones face detection slides
Avihu Efrat's Viola and Jones face detection slidesAvihu Efrat's Viola and Jones face detection slides
Avihu Efrat's Viola and Jones face detection slideswolf
 
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis GraphRedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis GraphRedis Labs
 
Succinct Data Structure for Analyzing Document Collection
Succinct Data Structure for Analyzing Document CollectionSuccinct Data Structure for Analyzing Document Collection
Succinct Data Structure for Analyzing Document CollectionPreferred Networks
 
[Mmlab seminar 2016] deep learning for human pose estimation
[Mmlab seminar 2016] deep learning for human pose estimation[Mmlab seminar 2016] deep learning for human pose estimation
[Mmlab seminar 2016] deep learning for human pose estimationWei Yang
 
Introduction to Capsule Networks (CapsNets)
Introduction to Capsule Networks (CapsNets)Introduction to Capsule Networks (CapsNets)
Introduction to Capsule Networks (CapsNets)Aurélien Géron
 
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...Kirill Eremenko
 
All about that pooling
All about that poolingAll about that pooling
All about that poolingDong Heon Cho
 
Mask-RCNN for Instance Segmentation
Mask-RCNN for Instance SegmentationMask-RCNN for Instance Segmentation
Mask-RCNN for Instance SegmentationDat Nguyen
 
傾向スコアマッチと多重補完法の解説 その1
傾向スコアマッチと多重補完法の解説 その1傾向スコアマッチと多重補完法の解説 その1
傾向スコアマッチと多重補完法の解説 その1Atsushi Shiraishi
 
ゲームAIとマルチエージェント(上)
ゲームAIとマルチエージェント(上)ゲームAIとマルチエージェント(上)
ゲームAIとマルチエージェント(上)Youichiro Miyake
 
AIFrienz_Webinar_Tomomi_Research_Inc).pdf
AIFrienz_Webinar_Tomomi_Research_Inc).pdfAIFrienz_Webinar_Tomomi_Research_Inc).pdf
AIFrienz_Webinar_Tomomi_Research_Inc).pdfSeong-Hun Choe
 
220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualization220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualizationtaeseon ryu
 
[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)Donghyeon Kim
 

La actualidad más candente (20)

[Paper] eXplainable ai(xai) in computer vision
[Paper] eXplainable ai(xai) in computer vision[Paper] eXplainable ai(xai) in computer vision
[Paper] eXplainable ai(xai) in computer vision
 
Find nuclei in images with U-net
Find nuclei in images with U-netFind nuclei in images with U-net
Find nuclei in images with U-net
 
自然言語処理の最新技術動向紹介
自然言語処理の最新技術動向紹介自然言語処理の最新技術動向紹介
自然言語処理の最新技術動向紹介
 
Avihu Efrat's Viola and Jones face detection slides
Avihu Efrat's Viola and Jones face detection slidesAvihu Efrat's Viola and Jones face detection slides
Avihu Efrat's Viola and Jones face detection slides
 
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis GraphRedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
 
CIFAR-10
CIFAR-10CIFAR-10
CIFAR-10
 
Succinct Data Structure for Analyzing Document Collection
Succinct Data Structure for Analyzing Document CollectionSuccinct Data Structure for Analyzing Document Collection
Succinct Data Structure for Analyzing Document Collection
 
Understanding AlphaGo
Understanding AlphaGoUnderstanding AlphaGo
Understanding AlphaGo
 
[Mmlab seminar 2016] deep learning for human pose estimation
[Mmlab seminar 2016] deep learning for human pose estimation[Mmlab seminar 2016] deep learning for human pose estimation
[Mmlab seminar 2016] deep learning for human pose estimation
 
Cap4 prt
Cap4 prtCap4 prt
Cap4 prt
 
[Track1-5] 製造業における最新AI適用事例のご紹介
[Track1-5] 製造業における最新AI適用事例のご紹介[Track1-5] 製造業における最新AI適用事例のご紹介
[Track1-5] 製造業における最新AI適用事例のご紹介
 
Introduction to Capsule Networks (CapsNets)
Introduction to Capsule Networks (CapsNets)Introduction to Capsule Networks (CapsNets)
Introduction to Capsule Networks (CapsNets)
 
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
 
All about that pooling
All about that poolingAll about that pooling
All about that pooling
 
Mask-RCNN for Instance Segmentation
Mask-RCNN for Instance SegmentationMask-RCNN for Instance Segmentation
Mask-RCNN for Instance Segmentation
 
傾向スコアマッチと多重補完法の解説 その1
傾向スコアマッチと多重補完法の解説 その1傾向スコアマッチと多重補完法の解説 その1
傾向スコアマッチと多重補完法の解説 その1
 
ゲームAIとマルチエージェント(上)
ゲームAIとマルチエージェント(上)ゲームAIとマルチエージェント(上)
ゲームAIとマルチエージェント(上)
 
AIFrienz_Webinar_Tomomi_Research_Inc).pdf
AIFrienz_Webinar_Tomomi_Research_Inc).pdfAIFrienz_Webinar_Tomomi_Research_Inc).pdf
AIFrienz_Webinar_Tomomi_Research_Inc).pdf
 
220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualization220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualization
 
[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)
 

Destacado

Detecting Drug Effects in the Brain
Detecting Drug Effects in the BrainDetecting Drug Effects in the Brain
Detecting Drug Effects in the Brainhtstatistics
 
From L to N: Nonlinear Predictors in Generalized Models
From L to N: Nonlinear Predictors in Generalized ModelsFrom L to N: Nonlinear Predictors in Generalized Models
From L to N: Nonlinear Predictors in Generalized Modelshtstatistics
 
Modelling the Diluting Effect of Social Mobility on Health Inequality
Modelling the Diluting Effect of Social Mobility on Health InequalityModelling the Diluting Effect of Social Mobility on Health Inequality
Modelling the Diluting Effect of Social Mobility on Health Inequalityhtstatistics
 
Custom Functions for Specifying Nonlinear Terms to gnm
Custom Functions for Specifying Nonlinear Terms to gnmCustom Functions for Specifying Nonlinear Terms to gnm
Custom Functions for Specifying Nonlinear Terms to gnmhtstatistics
 
Generalized Bradley-Terry Modelling of Football Results
Generalized Bradley-Terry Modelling of Football ResultsGeneralized Bradley-Terry Modelling of Football Results
Generalized Bradley-Terry Modelling of Football Resultshtstatistics
 
gnm: a Package for Generalized Nonlinear Models
gnm: a Package for Generalized Nonlinear Modelsgnm: a Package for Generalized Nonlinear Models
gnm: a Package for Generalized Nonlinear Modelshtstatistics
 
Nonlinear Discrete-time Hazard Models for Entry into Marriage
Nonlinear Discrete-time Hazard Models for Entry into MarriageNonlinear Discrete-time Hazard Models for Entry into Marriage
Nonlinear Discrete-time Hazard Models for Entry into Marriagehtstatistics
 
Multiplicative Interaction Models in R
Multiplicative Interaction Models in RMultiplicative Interaction Models in R
Multiplicative Interaction Models in Rhtstatistics
 
Clustering Microarray Data
Clustering Microarray DataClustering Microarray Data
Clustering Microarray Datahtstatistics
 
Sample slides from "Programming with R" course
Sample slides from "Programming with R" courseSample slides from "Programming with R" course
Sample slides from "Programming with R" coursehtstatistics
 
Sample slides from "Getting Started with R" course
Sample slides from "Getting Started with R" courseSample slides from "Getting Started with R" course
Sample slides from "Getting Started with R" coursehtstatistics
 
Знаменские чтения
Знаменские чтенияЗнаменские чтения
Знаменские чтенияEkaterina Kushnir
 
Три хита по управлению проектами от компании "Гибкие технологии"
Три хита по управлению проектами от компании "Гибкие технологии"Три хита по управлению проектами от компании "Гибкие технологии"
Три хита по управлению проектами от компании "Гибкие технологии"Евгений Пикулев
 
בני כלאיים באמנות עכשווית
בני כלאיים באמנות עכשוויתבני כלאיים באמנות עכשווית
בני כלאיים באמנות עכשוויתHadassa Gorohovski
 
Delivering Reviews - ICA
Delivering Reviews - ICADelivering Reviews - ICA
Delivering Reviews - ICAJoAnn Corley
 

Destacado (20)

Detecting Drug Effects in the Brain
Detecting Drug Effects in the BrainDetecting Drug Effects in the Brain
Detecting Drug Effects in the Brain
 
From L to N: Nonlinear Predictors in Generalized Models
From L to N: Nonlinear Predictors in Generalized ModelsFrom L to N: Nonlinear Predictors in Generalized Models
From L to N: Nonlinear Predictors in Generalized Models
 
Modelling the Diluting Effect of Social Mobility on Health Inequality
Modelling the Diluting Effect of Social Mobility on Health InequalityModelling the Diluting Effect of Social Mobility on Health Inequality
Modelling the Diluting Effect of Social Mobility on Health Inequality
 
Custom Functions for Specifying Nonlinear Terms to gnm
Custom Functions for Specifying Nonlinear Terms to gnmCustom Functions for Specifying Nonlinear Terms to gnm
Custom Functions for Specifying Nonlinear Terms to gnm
 
Generalized Bradley-Terry Modelling of Football Results
Generalized Bradley-Terry Modelling of Football ResultsGeneralized Bradley-Terry Modelling of Football Results
Generalized Bradley-Terry Modelling of Football Results
 
gnm: a Package for Generalized Nonlinear Models
gnm: a Package for Generalized Nonlinear Modelsgnm: a Package for Generalized Nonlinear Models
gnm: a Package for Generalized Nonlinear Models
 
Nonlinear Discrete-time Hazard Models for Entry into Marriage
Nonlinear Discrete-time Hazard Models for Entry into MarriageNonlinear Discrete-time Hazard Models for Entry into Marriage
Nonlinear Discrete-time Hazard Models for Entry into Marriage
 
Multiplicative Interaction Models in R
Multiplicative Interaction Models in RMultiplicative Interaction Models in R
Multiplicative Interaction Models in R
 
Clustering Microarray Data
Clustering Microarray DataClustering Microarray Data
Clustering Microarray Data
 
Sample slides from "Programming with R" course
Sample slides from "Programming with R" courseSample slides from "Programming with R" course
Sample slides from "Programming with R" course
 
Sample slides from "Getting Started with R" course
Sample slides from "Getting Started with R" courseSample slides from "Getting Started with R" course
Sample slides from "Getting Started with R" course
 
Social Business as the New Organizing Principle
Social Business as the New Organizing PrincipleSocial Business as the New Organizing Principle
Social Business as the New Organizing Principle
 
Знаменские чтения
Знаменские чтенияЗнаменские чтения
Знаменские чтения
 
Три хита по управлению проектами от компании "Гибкие технологии"
Три хита по управлению проектами от компании "Гибкие технологии"Три хита по управлению проектами от компании "Гибкие технологии"
Три хита по управлению проектами от компании "Гибкие технологии"
 
הומור בסין חלק ב
הומור בסין חלק בהומור בסין חלק ב
הומור בסין חלק ב
 
בני כלאיים באמנות עכשווית
בני כלאיים באמנות עכשוויתבני כלאיים באמנות עכשווית
בני כלאיים באמנות עכשווית
 
Astralpool
Astralpool Astralpool
Astralpool
 
Resume
ResumeResume
Resume
 
Delivering Reviews - ICA
Delivering Reviews - ICADelivering Reviews - ICA
Delivering Reviews - ICA
 
Zhao
ZhaoZhao
Zhao
 

BradleyTerry2: Flexible Models for Paired Comparisons

  • 1. BradleyTerry2: Flexible Models for Paired Comparisons Heather Turner and David Firth Department of Statistics University of Warwick, UK 21 July 2010 H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 1 / 15
  • 2. Pair Comparisons In situations where one object is pitted against another, e.g. players/teams in sport consumer products in market research images in psychology experiments plants in pest-resistance trials alleles in transmission from parent to child H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 2 / 15
  • 3. Bradley-Terry Models In a contest between two players i and j, the basic Bradley-Terry Model is given by pr(i beats j) αi /(αi + αj ) αi odds(i beats j) = = = pr(j beats i) αj /(αi + αj ) αj where αi , αj > 0 are the player abilities. The abilities can be estimated via maximum likelihood by re-framing the model as a logistic model: logit(pr(i beats j)) = λi − λj H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 3 / 15
  • 4. Structured Bradley-Terry Models Contest-specific effects λik = αi + βr xikr r Ability modelled by player attributes λi = βr xir + ei r The prediction error ei allows for variability between players with equal covariate values induces correlation between comparisons with a common player H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 4 / 15
  • 5. The BradleyTerry2 package New features to accommodate general Bradley-Terry model flexible formula interface to modelling fitting function BTm(): allows player-specific, judge-specific, contest-specific variables and random effects PQL algorithm for estimation of GLMMs efficient data management of multiple data frames Best of original BradleyTerry package translation of ability formula to design matrix methods for fitted model object, e.g. anova, BTabilities handling of missing data in player covariates H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 5 / 15
  • 6. College Ice Hockey: Men’s Division I 1083 games from the 2009-10 composite schedule 58 teams from 6 conferences Results in data frame icehockey visitor visiting team opponent usually home team result 1, 0 or 0.5 H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 6 / 15
  • 7. KRACH Ratings Ken’s Ratings for American College Hockey are obtained from a standard Bradley-Terry model with a separate ability for each team: > standardBT <- BTm(outcome = result, + player1 = data.frame(team = visitor), + player2 = data.frame(team = opponent), + id = "team", formula = ~ team, data = icehockey) The default behaviour provides some simplification > standardBT <- BTm(outcome = result, + player1 = visitor, player2 = opponent, + id = "team", data = icehockey) H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 7 / 15
  • 8. Converting BTm Results to KRACH The BTabilities function returns the log-abilities and s.e. > head(BTabilities(standardBT), 4) ability s.e. Alaska-Anchorage 0.0000000 0.0000000 Air Force -1.4135091 0.6560509 Alabama-Huntsville -0.6825408 0.6052347 American Int’l -2.9316119 0.7121359 KRACH rescales the abilities so that KRACH = 100 ⇒ RRWP = 0.5 > KRACH <- exp(BTabilities(standardBT)[,1])*scale > head(sort(round(KRACH, 1), decr = TRUE)) Denver Miami Wisconsin 543.0 488.2 481.3 North Dakota Boston College St. Cloud State 434.3 346.2 345.3 H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 8 / 15
  • 9. Home Ice Advantage The official NCAA ranking gives more credit for neutral-site/road wins. Equivalently we can adjust for home ice advantage > levelBT <- BTm(result, + data.frame(team = visitor, home.ice = 0), + data.frame(team = opponent, home.ice = home.ice), + ~ team + home.ice, id = "team", data = icehockey) 10 15 20 25 30 35 No. Teams 5 0 −4 −3 −2 −1 0 1 2 3 4 5 6 Change in Rank H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 9 / 15
  • 10. Effect on Selection? The 6 regional winners automatically qualify for the NCAA tournament, whilst another 10 are selected by ranking KRACH level KRACH NCAA Denver Denver Miami Miami Miami Denver Wisconsin Wisconsin Wisconsin St. Cloud State St. Cloud State St. Cloud State Minnesota Duluth Bemidji State Bemidji State Northern Michigan Northern Michigan Yale Colorado College New Hampshire Northern Michigan New Hampshire Minnesota Duluth New Hampshire Minnesota Colorado College Alaska Bemidji State Vermont Vermont H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 10 / 15
  • 11. Lizards Data Revisited H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 11 / 15
  • 12. Data Structure in R > str(flatlizards) List of 2 $ contests :’data.frame’: 100 obs. of 2 variables: ..$ winner: Factor w/ 77 levels "lizard003","lizard005",..: 27 33 ..$ loser : Factor w/ 77 levels "lizard003","lizard005",..: 3 6 7 $ predictors:’data.frame’: 77 obs. of 18 variables: ..$ id : Factor w/ 77 levels "3","5","6","9",..: 1 2 3 4 ..$ throat.PC1 : num [1:77] -1.16 -13.19 -12.47 4.75 -13.47 ... ..$ throat.PC2 : num [1:77] 1.066 2.127 -0.771 8.399 -1.968 ... ..$ throat.PC3 : num [1:77] 3.2152 0.8776 -1.6139 0.0786 0.4982 . ... H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 12 / 15
  • 13. Model in Whiting et al, Animal Behaviour, 2006 > liz <- BTm(1, winner, loser, ~throat.PC1[..] + throat.PC3[..] + head.length[..] + SVL[..] + (1|..), data = flatlizards) No random effects Random effects Estimate Std. Error Estimate Std. Error lizard096 16.42 36.68 lizard099 0.84 1.16 0.95 1.28 throat.PC1 −0.09 0.03 −0.09 0.04 throat.PC3 0.34 0.11 0.37 0.15 head.length −1.13 0.49 −1.38 0.74 SVL 0.19 0.10 0.17 0.14 σe 1.1 0.3 H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 13 / 15
  • 14. Main conclusions from original study: Overall brightness (PC1) and UV intensity (PC3) of the throat are clearly significant predictors of fight-winning ability. PC3 has by far the largest effect: in a contest between lizards at ±2 standard deviations the odds are estimated as ≈ 30 in favour of the lizard with greater UV reflectance on the throat. Thankfully unaffected by allowing for variation between lizards with the same covariate values! H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 14 / 15
  • 15. Summary BradleyTerry2 can be downloaded from http://cran.r-project.org/package=BradleyTerry2 Package vignette gives further examples. Further development planned, e.g. better handling of ties random effects for judges H. Turner and D. Firth (Warwick, UK) BradleyTerry2 useR! 2010 15 / 15