简体   繁体   中英

BradleyTerry2 package in R - Using null hypothesis as reference player

I am using the BradleyTerry2 package in R to analyse my data. When using the BTm function to calculate ability scores, the first item in the dataset is removed as a reference, given a score of 0 and then other ability scores are calculated relative to this reference.

Is there a way to use a null hypothesis as a reference, rather than using the first item in the dataset?

This is the code I am using. The "ID" field is player id. This code calculates an ability score for each "Matchup," relative to the first matchup in the dataset.

BTv1 <- BTm(player1=winner,player2=loser,id="ID",formula=~Matchup+(1|ID),data=btmdata)

I am trying to test against the null hypothesis that matchup has no effect on match outcomes, but currently I don't know what ability score corresponds to the null hypothesis. I would like to use this null hypothesis as a reference, rather than using the first matchup in the dataset.

You can test the significance of terms in the model for ability using the anova function, ie

anova(BTv1, test = "Chisq")

Using the example data and script that you shared, we get the following result:

Sequential Wald Tests

Model: binomial, link: logit

Response: NULL

Predictor: ~Characters + (1 | ID)

Terms added sequentially (first to last)

           Statistic Df P(>|Chi|)   
NULL                                
Characters    46.116 26  0.008853 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM